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
battk
06/23/2022, 10:08 AM
suitescript offers no method to save the current record
battk
06/23/2022, 10:08 AM
you have to manipulate the dom to do so
battk
06/23/2022, 10:09 AM
you probably wont need to redirect to view mode, thats what usually happens
x
Xiaolei Hu
06/23/2022, 10:10 AM
Thanks! 😀
Xiaolei Hu
06/23/2022, 10:13 AM
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
Marvin
06/23/2022, 5:25 PM
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.