How to handle conflicts between copying and saving lotus-handling conflicting documents

Source: Internet
Author: User

 

Problem: Conflicts between replication and storage may occur when the database runs on the server and has multiple copies. How to deal with this situation is a problem that all the notes administrators and designers must face.

Duplicate and save conflictThis can be caused by the following reasons:

During the two copies, if two users simultaneously edit or multiple users edit the same document on different database copies, a copy conflict occurs. If two or more users edit the same document of the same database at the same time, a storage conflict occurs.

Solution:

1. You can select "merge copy conflicts" in the basic payment option in the form attribute box, and check the Version options in the basic payment option of the form.

2. Here are some methods and skills related to coping and saving conflicts:

1. Create a view to list all conflicting documents: (vewconflict) the conflicting document contains a domain named "$ conflict". Therefore, you can use the following formula to list all conflicting documents.

 

1 Select   @ Isavailable ("$ Conflict ")

 

 

2. display the conflicting document and the main document on the same screen to compare the differences between the two: Because the conflicting document is saved as the reply document of the main document, after a conflicting document is opened, use the shortcut icon "show/hide preview Main Document" to display the main document in the Preview pane.

3. Add a menu command to compare the differences between the two documents: Add the following line to the notes. ini file:

Addinmenus = c: \ notes \ nntediff. dll

After restarting the notes, we will find that "different of 2 document" is added to the "operation" menu ".

4. Find the main document of the conflicting document:

SubClick (source as button)

Const Foldername = "replicationconflict"

Dim s as new notessession

Dim doccol as notesdocumentcollection

Dim doc as notesdocument, topdoc as notesdocument

Dim folder as notesview

Set dbcur = S. currentdatabase

Set doccol. dbcur. unprocesseddocuments

Set Doc = doccol. getfirstdocument

While not (Doc is nothing)

Set topdoc = gettopdoc (DOC)

Call topdoc. putinfolder (Foldername)

Set Doc = doccol. getnextdocument (DOC)

Wend

End sub

Function gettopdoc (docsource as notesdocument) as notesdocument

Dim doctop as notesdocument dim strunid as string

Set doctop = docsource

Strunid = doctop. parentdocumentunid

Do While (strunid <> "")

Set doctop = dbcur. getdocumentbyunid (strunid)

Strunid = doctop. parentdocumentunid

Loop

Set gettopdoc = doctop

End functiong

5. Save the conflict document as the master document and select several conflict documents to run the following proxy. This proxy saves the selected conflict document as the main document.

Dim s as new notessession

Set DB = S. currentdatabase

Set Dc = dB. unprocesseddocuments

Set Doc = Dc. getfirstdocument '$ conflict indicates conflicting documents

Call Doc. removeitem ("$ conflict") 'to obtain the master document of the conflicting document

If Doc. isresponse then

Set parent = dB. getdocumentbyunid (Doc. parentdocumentunid)

If parent. isresponse then', if the document replies

Dim grandparant as notesdocument

Set grandparant = dB. getdocumentbyunid (parent. parentdocumentunid)

Call Doc. makeresponse (grandparent) else '$ ref domain is a sign of the reply document

Call Doc. removeitem ("$ ref ")

End if

End if

Call Doc. Save (True, true)

When you use ls to create a document in the background, the "merge copy conflicts" option in the form is invalid. Add the following to the document:Code: Doc. $ conflicts = "1"

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.