Closing a sales order does not trigger a user even...
# suitescript
b
Closing a sales order does not trigger a user event. SuiteAnswers suggests listening to before load because the sales order always loads itself after being closed. Setting a checkbox can prevent the script from triggering after every load. Anyone have a better solution that doesn't involve creating a new field?
b
I normally go with @alien4u's suggestion of a custom button or the user event that sets a field when the status is closed
an extreme alternative is to rely on NetSuite adding the base_t cookie and check that the base_t cookie contains the url path for closing sales orders
your beforeLoad user event can use the base_t cookie instead of a custom field to determine that the close button was pressed
I personally dont think its a better solution, but it does not need a new field