How do you not save the record with an AfterSubmit script? I thought 'return false;' would work but it is still saving the record
j
jmacdonald
10/11/2019, 2:01 PM
@Alex K you cannot stop a save in an AfterSubmit, it's after it has been submitted so it's already been created. You can throw an error in a beforeSubmit to stop a save but it will produce an ugly error. If possible it's best to do this in the saveRecord function in a client script.
a
Alex K
10/11/2019, 2:02 PM
sorry, my mistake meant BeforeSubmit type, you still answered my question anyway, thanks!
s
Sandii
10/11/2019, 2:02 PM
If the record is being submitted in the UI, return false on a client is a safe way as well.