https://netsuiteprofessionals.com logo
a

Alan Fitch

04/12/2022, 1:16 PM
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

mattdahse

04/12/2022, 1:26 PM
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

Alan Fitch

04/12/2022, 1:50 PM
Just to confirm this would be "DOM manipulation" and be unsupported by NS?
m

mattdahse

04/12/2022, 2:44 PM
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

NickSuite

04/12/2022, 4:45 PM
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.