Lotus Notes FAQ Visit Our Sponsor!

How do I make the "loser" of a replication/save conflict be the

When you select the "loser" document and run this agent, it will be promoted to be a replication "winner". You can then delete the original "winner" document. Put this code into an agent that runs on selected documents:

Sub Initialize
  ' From Kevin Pauli (kcpauli@usa.net)
  Dim session As New NotesSession
  Set db = session.CurrentDatabase
  Set collection = db.UnprocessedDocuments
  Set doc = collection.GetFirstDocument
  Call doc.RemoveItem( "$Conflict" )
  If doc.IsResponse Then
    Set parent = db.GetDocumentByUNID( doc.ParentDocumentUNID )
    If parent.IsResponse Then
      Dim grandParent As NotesDocument
      Set grandParent = db.GetDocumentByUNID(parent.ParentDocumentUNID )
      Call doc.MakeResponse( grandParent )
      Call doc.RemoveItem( "$REF" )
    End If
  End If
  Call doc.Save( True, True )
End Sub

Glenn Thibert (glenn.thibert@thehartford.com) suggested something much simpler:

1) Highlight the 'winner' doc and press the delete key so that the trashcan icon appears.
2) Highlight the 'loser' doc and use the menu command or smarticon for Tools - Refresh Selected Docs

When you hit F9, the deleted doc will disappear and the 'loser' conflict will be in the view as the winner.

Applies to Notes Versions: 4 4.5 4.6 5
Last Modified: March 1, 2000