I have a script in a popover that submits global field into creating a new record in a specific layout. How do I stop the script and trigger a message (object, of course) if a specific global field is empty?
Ie. The user selects a specific record in a linked table from a list and then adds this linked new record through the globals. I want them not to be able to submit a new record of nothing is selected.
Alternatively, not being able to enter or even hit submit with an empty specific global would work equally well.
Essentially, I need to prevent them from unwittingly creating an unlinked record. (The linked ID happens in the background when the submit button is clicked.)
Right up front, start your script with
If ( IsEmpty(globalfield) )
Show Custom Dialog [the stuff you want to say]
Check for the mandatory stuff right up front, and dump out of the script if something is wrong.