Solved

Updating parent field

Posted on 2004-03-26
9
225 Views
Last Modified: 2013-12-18
I cannot seen to make this work today. I have used this but....
I need to update a field in the parent and the lotus script code is located in the Postsave of the child
Dim parentcomposed As String
Dim composed As String
parentcomposed = parentdoc.FieldGetText(fld_ECN_seqnum)
composed = source.FieldGetText( "RFC_seqnum")
If  composed <> ""  Then
 Messagebox composed
 parentcomposed = parentdoc.FieldSetText(fld_ECN_seqnum) --- This part does not work
End If      
      
0
Comment
Question by:cyle
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10689306
I am not sure what you are trying here..

FIELDSetText method syntax

FIeldSetText( FieldName, textvalue)

~Hemanth
0
 

Author Comment

by:cyle
ID: 10689316
Error is Object variable not set.
0
 

Author Comment

by:cyle
ID: 10689396
I have parent and a response child now when I save I generate a number in the child. Now this number needs to be sent to the parent.
0
ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 
LVL 15

Expert Comment

by:Bozzie4
ID: 10689455
Parentdoc is a notesdocument, so you must use backend methods, and fieldsettext is not a backend method.

Dim parentcomposed As String
Dim composed As String
parentcomposed = parentdoc.fld_ECN_seqnum(0)
composed = source.FieldGetText( "RFC_seqnum")
If  composed <> ""  Then
 Messagebox composed
 parentcomposed = parentdoc.fld_ECN_seqnum(0)
End If    

This doesn't update the parent document btw - this only loads a value from the parent.  If you want to update the parent document, you must do something like this

parentdoc.FieldToUpdate = "newvalue"
Call parentdoc.save( true, true )

cheers,

Tom
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10689457
How are you assigning parentDoc?

Are you checking that it is in edit mode?
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10689470
Bozzie is sort of correct... but if that were the case, you would see failure in the FieldGettext line, and you only indicated failure in the FieldSettext line.  That's why I was inclined to think it might be a read/edit mode issue.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 50 total points
ID: 10689531
You can use @formula to do that

@SetDocField( $Ref; "fld_ECN_SeqNum" ; RFC_SeqNum)
0
 

Author Comment

by:cyle
ID: 10689681
In the Postsave?
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10689935
Yes.. you can
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question