Home > Domino Tips > Developer > LotusScript > Avoid replication issues when editing Lotus Notes response documents
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

LOTUSSCRIPT

Avoid replication issues when editing Lotus Notes response documents


Ahmad Kamali
02.26.2008
Rating: -2.50- (out of 5)


Lotus Notes, Domino, Workplace and WebSphere tips and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


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.

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Lotus Notes Domino Replication and Synchronization
Use DXL utilities for advanced replication settings in Notes
Use LotusScript to create encrypted replicas
Lotus Notes Domino replication primer
More efficient local Lotus Notes database replication
BlackBerry Intellisync error: 'A Lotus Notes error has occurred. Please see log for details.'
Setting up local replication of a Lotus Notes database for offline employees
Routing and replication issues with remote Lotus Domino servers
Replication best practices for Lotus Domino disaster recovery
How and why to change replica IDs during a Lotus Notes Domino upgrade
Lotus Notes replication snafu: Accidentally deleted archived email

LotusScript
Fail-safe rich-text validation using LotusScript
How to export Lotus Notes views to a Microsoft Excel database
Create file system labels for Microsoft Excel and Word mail merges
Fix Lotus Notes 8.0 issues when launching Microsoft Office applications
Capture rich-text comments in Lotus Notes fields using LotusScript
Retrieve cell values from tables in a Lotus Notes rich-text field
Adding new variable-sized, multi-value fields to Lotus Notes documents
Keep the original Universal ID when copying a Lotus Notes document
Append Lotus Notes text in Microsoft Notepad to avoid text size limits
Setting up return receipts for LotusScript-generated Lotus Notes email

LotusScript
Fail-safe rich-text validation using LotusScript
How to export Lotus Notes views to a Microsoft Excel database
Modifying LotusScript code for date and time handling
Create file system labels for Microsoft Excel and Word mail merges
Fix Lotus Notes 8.0 issues when launching Microsoft Office applications
Capture rich-text comments in Lotus Notes fields using LotusScript
Retrieve cell values from tables in a Lotus Notes rich-text field
Adding new variable-sized, multi-value fields to Lotus Notes documents
Keep the original Universal ID when copying a Lotus Notes document
Fix 'Audit Trail' error when opening Notes docs

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsWebcastsWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts