Documents do not Unlock when opening that document from LotusScript

I was finally able to reproduce a document lock problem. Sometimes when a user edits a document, it would not get unlocked. Here’s what I discovered.

When users accesses a document directly from a View, or from a doclink, the document will successfully unlock when the user closes the document.

However. If the user opens the document from a LotusScript button, the document is locked when the user edits the document, but is NOT unlocked when the user saves or otherwise closes the document window. (They use the ESC key to close the window without saving, or save their changes.)

Here’s some example LotusScript. It’s a button in one database, that opens a document in another database.

Set doc = caseDb.GetDocumentByUNID( x )

Call workspace.EditDocument( False, doc, False, “”, False, False )

I also tried opening the database before call “workspace.EditDocument”. Same result.

Set doc = caseDb.GetDocumentByUNID( x )

Call workspace.OpenDatabase( server, filepath, “”, “”, False )

Call workspace.EditDocument( False, doc, False, “”, False, False )

I also tried opening the document in Edit mode, or Read mode. Same result.

In all cases, the user opens a document by clicking a LotusScript button from another database, has that document in Edit mode, the server adds the (hard) lock, and finally the user closes the document window. The document does not unlock.

— Other information —

Document locking is enabled on the database properties.

Client and server versions are 6.5.1 on Windows2000.

Database ACL has the administration server defined correctly.

My test user has Manager access to the database.

Subject: RE: Documents do not Unlock when opening that document from LotusScript

That sounds like a bug, all right. You should call Lotus Support to report it, or follow the bug reporting procedure described in the FAQ. If you’re a Business Partner there’s a bug reporting form in the BP Forum.

Subject: RE: Documents do not Unlock when opening that document from LotusScript

I don’t work for an IBM business partner, and thus will not report the bug. Reasons are personal time and expense.

http://www.keysolutions.com/NotesFAQ/howreport.html