No go on either suggestion. The code is not in any agent. If I need to create a new document link, a field is set on the document. The document is saved and during the PostSave, the field is checked and if true, new links are created.
I do not have an On Error, so I am seeing any messages the system is providing.
I have tried debug a number of times. Works exactly as it should with debug turned on. I turn debug off and it will fail again on occasion.
I tried your suggestions for the rti.update and the source.refresh(true), to no avail. I put the source.refresh(true) at the end of the processing within the querysave. I put the rti.update in the PostSave before the save within that routine.
What I can’t seem to figure out is I move from the Save button to the Close button and occasionally it wants to save again. How do I determine what has changed ? ? ?
This way, it will prompt you only when the document is not saved.
In QueryClose event of that form, add this too:
@If(@IsAvailable(SaveOptions); FIELD SaveOptions:=@DeleteField; “”)
So that if saveoptions field is added, while closing the document, it will be removed. When you open the document next time, you can be able to save it. Otherwise SaveOptions := 0 will not allow you to save it.
I have lotusscript in my QuerySave, PostSave and QueryClose. The QuerySave ensures all fields are entered correctly, and if the document link needs to be altered - it empties the current rich text field and sets a status field. If a status field is set, the PostSave creates the document links within the rich text fields of the document. We created our own for of document locking a number of years ago so the QueryClose “unlocks” the document for other users. The QueryClose in no way affects the current document.
I can’t use formula language for any of these events because of the processing required. I like to give the users the ability to save the document and continue working. I would really hate to force a save/close. Realize thought that in saying that, if I hit Save and then immediately Close the document, I occassionly get another prompt to save the document. I have transferred by QuerySave code to “OnSubmit” so see if I have better luck there … to no avail.