Avoid Save Conflicts Over the Web

Here is a cool method of avoiding the save conflicts over the Web. It is basically comparing the time the document was brought on to the Web and the time the document was saved last; if both are same then no conflicts else there is a conflict and make the save options field to "0" so the document is not saved.

Concept :- create a computed for display field named "Web_Modified" on the form with the default value as
"@If(@IsDocBeingSaved;Web_Modified;@ReplaceSubstring( @Text(@Modified) ; " " ; "_" ))

Add SaveOptions[Computed for display] field with default value as "1"

In the webquerysave run an agent which as the following.

set session = new NotesSession
Set db = session.currentdatabase
set thisdoc = session.documentcontext

If thisdoc.HasItem("Web_Modified") Then
If thisdoc.Web_Modified(0) <> "" Then
om = thisdoc.Web_Modified(0)
End If
End If

tmp = Evaluate( {@ReplaceSubString( @Text(@Modified) ; " " ; "_" )} , thisdoc )
nm = tmp(0)

If om = nm Then
" Continue , there is no save conflict ,
"make saveOptions field to "0"
" give a alert box asking the user to resubmit the document

End If

Dig Deeper on Domino Resources - Part 2

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • 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 ...