Hi, i have a button created in a user event script...
# suitescript
x
Hi, i have a button created in a user event script(edit mode, to enable module currentRecord). To click this button, a client side script would trigger, and a dialog would shown. By clicking on the dialog (e.g. confirm something ok), i want to save this record and redirect to view mode of the record. Is it possible?
b
suitescript offers no method to save the current record
you have to manipulate the dom to do so
you probably wont need to redirect to view mode, thats what usually happens
x
Thanks! 😀
I will do some update on the record and click the button, that is why i want to save the record when get confirming on the dialog.
m
Probably what might be helpful is to remove the value from the field if the dialog is for validation. You can create your dialogue with custom buttons and catch the response of each. If they say OK, do nothing, but if they use Cancel then remove the field value that your validating. If it's more than a single field your validating sometimes what I will do is create a dynamic validation field in a User Event script to hold validation state. That way I can validate in real time and store validation state so that on save I can just check validation state.