Lotus Notes FAQ Visit Our Sponsor!


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

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 )
    Else
      Call doc.RemoveItem( "$REF" )
    End If
  End If
  Call doc.Save( True, True )
End Sub


Applies to Notes Versions: 4 4.5 4.6 5
Last Modified: August 25, 1997
Home *Notes R3 *Notes R4 *Notes/Domino 4.5 *Notes/Domino 4.6 *Notes/Domino R5