RE: -SOLUTION- Disable Edit mode unless through button... Pete Burn 3.Oct.06 07:40 AM a Web browser Notes Client All ReleasesAll Platforms
Nice answer. Was going to suggest an alternative but you got there with an answer before I got back :)
I've always implemented doc locking by having a marker document which is created when a doc is put in edit mode (by double click, Ctrl e, whatever). create this document through QueryModeChange and store the doc ID of the doc being edited. You can also store the name of the person editing the document. When another user tries to edit the document, QueryModeChange looks to see if this marker doc exists and if it does, puts up a warning (possibly including the name of the current editor) and returns false. The marker doc is deleted when the person editing the document either switches back to read mode or closes the document (save is not good enough as they make keep the doc open and make more edits).
Just occasionally, a users machine may crash (or more likely, the Notes Client crashes :)) and an orphan marker doc is left in place. I get round this by adding an Admin only action in each doc to delete the marker doc for that doc ID.
Downside (as with so many things in Notes) is that it doesn't work across multiple servers.
Guess this is purely academic as you've already found an answer but it may be of use to you or someone else in the future.