Solved

Updating parent field

Posted on 2004-03-26
9
223 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now