Hi,I have a shared DB (25 users +) and am trying to implement the new LN6 document locking. This DB is also replicated on 1 other server.
What Im trying to do is:
- I want to prevent users to reply to a email which another user is already busy replying to. (With a message box indicating who is currently replying to the email).
What I have tried:
-
I enabled document locking on the DB.
-
Created the $Writers field on the form.
-
I put the following code in the postopen event of the reply with history form:
Sub Postopen(Source As Notesuidocument)
Dim docBackend As NotesDocument
Set docBackend=Source.document
varLock=docBackend.GetItemValue("$Writers")
If ( varLock(0) <> "" ) Then
Msgbox ("Document is currently locked by "+varLock(0)+"")
Call Source.close
Exit Sub
End If
Call cMemoObject.PostOpen(Source)
End Sub
This works to the extent that it shows if a document is locked, by who, and exits. However I dont know how to actually lock the document (if its not locked) and then how to unlock the document after it has been replied to /sent again. I know I can do it manually from Actions-> Lock/Unlock Doc, but I want this to be done automatically when someone hits reply with history.
Any help would be helpfull, or other ways of going about this.
Thanks,
Fabio