Join Slack
Powered by
a confirm function upon saving seems to trigger th...
# suitescript
h
HL
01/14/2021, 12:47 AM
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
michoel
01/14/2021, 12:50 AM
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
HL
01/14/2021, 1:18 AM
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
michoel
01/14/2021, 1:20 AM
return window.confirm('Are you sure you want to save the record');
michoel
01/14/2021, 1:20 AM
You need to return the result of the confirm
h
HL
01/14/2021, 1:42 AM
Got it. Very helpful. Thank you
Open in Slack
Previous
Next