Trying to implement document locking in a small database. We use it in XPiNC. I found Julian Boss's excellent answer in in which he provides a javascript function that seems to have everything I need.
So in a small test database I added the script library and added as a resource. In my edit button I have the following code:
var ntdDoc:NotesDocument = document1.getDocument();
documentLocking.lockDoc(ntdDoc)
But this throws the following error:
Script interpreter error, line=2, col=17: [TypeError] Error calling method 'lockDoc(lotus.domino.local.Document)' on an object of type 'Object [JavaScript Object]'
1: var ntdDoc:NotesDocument = document1.getDocument();
-> 2: documentLocking.lockDoc(ntdDoc)
I have tried passing in the data source and that didn't work either. What do I need to pass?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…