Manage Learn to apply best practices and optimize your operations.

Avoid replication issues when editing Lotus Notes response documents

Learn how to edit Lotus Notes response documents via LotusScript and properly pass any modified values back to the parent to avoid replication issues.

Related LotusScript resources from SearchDomino.com:
Tutorial: 30 LotusScript tips

Tip: Gather Lotus Notes information from main and response documents

LotusScript Reference Center

A common scenario is to use LotusScript code to open a Lotus Notes document, access a related response document within it, edit that, and then save it. While this seems straightforward, replication issues can occur if this process is not executed properly.

To avoid replication problems, the modified value in the Lotus Notes response document must be passed back to the parent document. This LotusScript code will help you successfully edit response documents in Lotus Notes without creating replication conflicts.

Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim parentDoc As NotesDocument
Dim view As NotesView
 
Set db=session.currentDatabase
Set uidoc=workspace.CurrentDocument 
Set doc=uidoc.Document
 
Set view = db.GetView("svLookByDoc")
Set parentDoc = view.GetDocumentByKey
(doc.nJobNo_D(0),True)

If Not (parentDoc Is Nothing )Then
parentDoc.cStatus=doc.actStatus(0)
Call parentDoc.Save(True,False)
parentDoc.CloseMIMEEntities(True)
End If 

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Ahmad Kamali. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

This was last published in February 2008

Dig Deeper on Lotus Notes Domino Replication and Synchronization

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchExchange

SearchContentManagement

Close