Semi-related how can I save a record from the clie...
# suitescript
a
Semi-related how can I save a record from the client side while bypassing the
saveRecord
function? Basically I want to pop up a dialog when saving, let the user submit a few values, and then submit it after.
m
It’s a bit of a dance. You need to set a flag like “allowSave” to false. in beforeSave, if the flag is not true, you present the dialog and return false. In the promise of the dialog, you then set the allowSave flag to true and trigger the click on the save button for them.
a
Just to confirm this would be "DOM manipulation" and be unsupported by NS?
m
The only part that I’d consider “dom manipulation” would be triggering the click event. You can avoid that by making the user click save again.
n
In your client script on save record, show a "Prompt" and ask for the values, then set them and return true to save the record.