Hi,
in Lotus Script gibt es die Möglichkeit mittel der Createlock und destroylock eine Umgebung zu erstellen, die eine gesichert ist solange ein lock darauf ist. Somit kannst du das erzeugen was du erreichen willst. Erreichen könntest du es über eine Agent der die Vergabe auf Serverseite macht (runonserver) beim Speichern des Dokumentes.
Hier ein Code Beispiel:
Sub Initialize
Dim Sess As New NotesSession
Dim Doc As NotesDocument
Dim Count As NotesItem
Dim Status As Integer
Dim LockID As Integer
Dim others As Integer
' Creating a Lock ID or getting the Lock ID
' For the event of "Addresses"
LockID = Createlock("Addresses")
' Infinite loop that can only be exited
' when this agent has a successfull
' lock. An unsuccessfull lock means
' that this agent is presently being
' run by someone else.
Do While True
If Codelock(LockID) Then
Exit Do ' We finally have a lock, exiting Loop
End If
Loop
Set Doc = Sess.SavedData
Set count = Doc.GetFirstItem("Addresses")
If count Is Nothing Then
Set count = New NotesItem(Doc, "Adresse", 0)
End If
count.Values = count.Values(0) + 1
Call Doc.Save(True,False)
' Once completed, release and
' destroy this lock so another
' run of this agent can continue.
Status = CodeUnlock(LockID)
Status = DestroyLock(LockID)
End Sub