I have a form with a button. When i hit this button, the dialogbox appears. This dialog box changes some fields in the form. When I confirm those changes with OK button on the dialogbox, i want automatically save those changes into a form, so when i close the form, system do not ask me a question, if i want to save this form!Now i am always asked question, if i want to save the form …
Depending on what you’re trying to do, you can just add some code to the form’s ‘QueryClose’ event:
*For Formula
@If(@IsDocBeingEdited;@Command([FileSave]);“”)
*For LotusScript
Sub Queryclose(Source As Notesuidocument, Continue As Variant)
If Source.EditMode = True Then
Call Source.Save
End Sub
This will save any changes made to the form prior to closing (if the form is in edit mode). The only issue is that this will save even if you haven’t made any changes. You can put a (hidden) flag field on the form to be populated if the ‘OK’ button was pressed on the dialogbox and have the ‘QueryClose’ event check this field before saving (if you like).