Document lock forces Save Conflict - Why?

Scenario:1. There is a lock on a document and lock holder is myself.

  1. I open this document in edit mode and try to save.

Then I get this message: “Another copy of this document was saved while you were editing it. Save your changes also as a Save Conflict document?”

Answer yes creates a Save Conflict Document, answer no will return to the document without saving.

Is it a bug or a feature?

Does someone know a work around it?

Thanks in advance!

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.

Hope that helps

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.

Hope this helps you.

Servus,

matthias

Subject: Document lock forces Save Conflict - Why?

No idea yet… got the same with 6.5.3