I would like to throw a warning when a user closes...
# suitescript
a
I would like to throw a warning when a user closes a Sales Order based on some search criteria - I can't use Client Script saveRecord trigger because in that I don't have access to the "new" record. fieldChanged trigger will fire but I would only like to throw the error when user is trying to save. Also, the Close action could be taken by just using the button rather than closing all the lines in a Sales Order. Has anyone run into that? what is the best way to warn the user when they close a Sales Order.
b
you should be able to use saveRecord and the N/currentRecord module
for the button, there is no scripting that you can do, it skips client script. I would recommend hiding the button.
If the button is really necessary, make your own button that closes the sales order
a
Ah, thank you so much! I will try this. Did not know that there would be an option to hide native buttons. I will need a little more guidance about how to hide a native button. Any quick tips there?
b
customize the form, remove the Close action from the Actions subtab
👍🏽 1