Hi please help urgently,
How do I lock a document by the current user and then unlock it.
Hi please help urgently,
How do I lock a document by the current user and then unlock it.
Subject: lock a document(please help)
Hie
To lock/Unlock doc, you need to tackle using JS & LS.
OnLoad call an agent using JS function. (?openagent&ID=…&UserName=…)
Have a view to store all docs that are being currently edited, i.e. locked docs.
Referring to step 1, using agent, check whether you already have a doc. with the same combination of DocID+Username. If Yes, dont allow user to edit doc. & display customised msg instead. If not, then create a doc. with Doc ID+Username combination.
Suppose in this agent you din’t find any doc. – means it is not locked by another user, you create one lock doc. & onUnload delete the locked doc created.
Hope this helps you…
~Cheers
Subject: lock a document(please help)
If you want to use formula language, you have the following functions for locking and unlocking as:@DocLock([LOCK])
@DocLock([UNLOCK])
Note: You need to enable the check box in the database properties for “Allow Document Locking”