Subject: Document lock forces Save Conflict - Why?
Hi Kurt,
My understanding of document locking when enabled as a database property is that a lock is only issued when you put the document into edit mode, and then released when you close the document. Your description implies its already locked before you edit it - if this lock isn’t being generated by any code that you’ve added, then it could be that the last time you edited this doc it didn’t close properly, leaving the lock in place. In that case, you can remove the lock by selecting the doc in a view and then use the Actions menu - there is an Unlock Document option.
Subject: Document lock forces Save Conflict - Why?
Kurt,
I think it’s a feature…
When lock is active, you have propable lock your documents manually…
See this:
Set db= session.currentDatabase
Set newAttachment = db.CreateDocument
Call newAttachment.ReplaceItemValue("Form", 'FormAttachment" )
Call newAttachment.ReplaceItemValue(".parentKey", currentDoc.~.docKey(0) )
Call newAttachment.ReplaceItemValue(".anlagenKey", currentDoc.~.parentKey(0))
If db.IsDocumentLockingEnabled Then
Call newAttachment.Lock()
End If
Call workspace.EditDocument( True, newAttachment )
–
Now you can save the new opened document more than one time without save conflict.