Generating a customized error in QuerySave so FileSave does not pass

Generating a customized error in QuerySave so FileSave does not pass

I have field validation in the QuerySave event. In case of non-validation I set the continue flag to false and I stay with the open document.

It succeeds with a button with @Command([FileSave]) but it fails with a button with the formula:

@If(!@IsError(@Command([FileSave])) ; @Command([FileCloseWindow]); @Return(""))
So how can I generate a customized error in the QuerySave event so that the FileSave does not pass and the document window will stay open?

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

FileSave never returns an error code -- it returns True if the save worked and False if it didn't. Try this instead:
@If(@Command([FileSave]) ; 
@Command([FileCloseWindow]); "") 

This was first published in October 2003