Ian Irving's Better Save & Close Action
This whole blogging thing is really interesting. Today when glancing through my referrer list I noticed some hits from a domino blog in italy, which appropriately enough, is all in Italian. Seems several Show-n-Tell Thursday posts, mine from last week included, caught the eye of someone at Dominopoint.it.
Delving deeper to have a peek at the other three posts mentioned, I came across one here from Ian Irving that actually has a direct tie-in to my modular validation post. Basically, I left out a potentially important element in my tip relating to how you code a "Save & Close" action button to avoid raising an error when the validation kicks in. As I mention in my comment to Ian's post:
"What I forgot to mention in that post is that since you’re interrupting the querysave by popping up a validation dialog, a “normal” filesave/fileclose action button will raise an error.
The solution I had was to use a Lotusscript button with the following code:
Sub Click(Source As Button)
On Error Goto FINISH
Call uidoc.save ‘ if validation fails, this line should generate an error
‘If no error generated, then lets continue…
In short, I like Ian's approach better, which is nothing more than this: