a confirm function upon saving seems to trigger th...
# suitescript
h
a confirm function upon saving seems to trigger the record to save regardless of if the user clicks Okay or Cancel. Any obvious things to check first?
m
I assume you mean in a saveRecord entry point on a client script. You need to return false from the function if you want to prevent it from saving
h
Hmm I seem to have the opposite problem then if I include return false. Now it doesn’t save even if Okay on the confirmation is selected
m
return window.confirm('Are you sure you want to save the record');
You need to return the result of the confirm
h
Got it. Very helpful. Thank you