Suppress or work around "Commit Records/Requests has been canceled. Do you wish to continue..." dialog in script
I'm hoping someone can help me work around an issue with a script that I have attached to a button. It is intended to:
 commit the current record (if it requires it)
 take the resulting serial ID that is created on commit
 open a new layout and record and populate a field in the layout with the newly created serial ID
My script works fine, except if the user presses the button and the commit fails (e.g. the user hasn't made an entry in a required field), the user sees two dialogs. The first is the useful dialog telling the user that the record cannot be commited, and the second is a dialog telling the user that "Commit Records/Requests has been canceled. Do you wish to continue with this script?". What I'd like to do is avoid displaying the latter dialog and just terminate the script. Is there any way to do this?