Lotus Notes FAQ Visit Our Sponsor!

How do you lock a document that is being edited?

You need to have a button to start editing these docs. The button will set a field (e.g. 'EditFlag') to a certain value and save the document at once, and then let the user edit the doc. When he finishes, he has to save the document again, with another button, which will delete the field and save the doc. If another user tries to edit the doc while the field 'EditFlag' is set, an error message stating 'this document is being edited, please try later again' would appear.
If the user crashes during the edit, the flag will be left on and you will have to use a macro to clear the edit flag on the document.


Applies to Notes Versions: 3
Last Modified: May 21, 1997