Something I’ve seen far to often is a Lotus Notes “Save & Exit” action button that does this, in formula language:
It’s quick and easy formula language, and seems to do the job. However, it is also sloppy.
The Problem: if the “Save” fails (say, because of validation), it still tries to do the “FileCloseWindow”, which causes another promoting to save (which will still fail), and if you cancel that, the form closes without saving any changes. Result: lost work; no change to correct; and very annoyed users.
Instead use this, which does the same thing, but much better:
The “FileCloseWindow” gets executed only if the “Save” is successful. Just as quick and easy, and much more robust.
This way of doing it has been available at least Notes R3, which is the before the mid 90’s. For the record we are up to R7, now.
Update: Thanks for the link love Ed! via Show n tell exposes sizeable talent…Talent – maybe, Exposure – no doubt! (Ed Brill is the Business Unit Executive for the Worldwide Lotus Messaging Sales, IBM Software Group)