By
Published: 25 Feb 2005
I have a form in the Notes Client. A LotusScript button on the form creates a new Notes document object, assigns values to it from the current document and then opens it up in a DialogBox so the user can finish entering information.
I want the dialogbox to pass back to the calling code whether the user clicked ok or cancel. If I use DialogBox default buttons the OK passes a True back, but does NOT save the newly created document. If I use my own OK button to save and close, then a false is passed back to the calling code.
Is there a way to save this newly created document if the user clicks OK and return that value back? I can't pre-save it because the DialogBox needs to be validated.
The easy way to do this is to have the LotusScript code that calls the DialogBox check the return value, and if it's True,
that code saves the new document. This should work unless you have a Rich Text field in the dialog (Rich Text is not passed back to the caller of DialogBox).
If you must save the dialog document while the dialog is still open, then your OK button can use the RefreshParentNote command (see RefreshParentNote @Command or Tech Tip: Dialog buttons in Notes 6.x) to update field values for the caller. I think that will make the DialogBox call return True; if not, you can set a field to tell the caller that OK was clicked.
Dig Deeper on LotusScript
Learn how you can use LotusScript and OLE to create and populate Microsoft Excel spreadsheets, as well as a little bit about Lotus Symphony.
Continue Reading
Discover options you can use if you'd like external users to be able to access a workflow-based Notes Domino application through different ...
Continue Reading
When Notes/Domino developers say they want to "update the fields" in tha Lotus Notes view, they usually mean that they want to cause computed fields ...
Continue Reading