One more question, sorry. Anyone knows how to hand...
# suitescript
d
One more question, sorry. Anyone knows how to handle pressing standard "Close Order" button and add some logic and checks?
n
Did you check the user event type?
d
Yes, but it's not triggering any userEvent functions
n
There is no event for Close that will trigger Userevent.
What you can do is add a custom button, do your logic, and then close the sales order by closing the line items.
d
Yep, thank you!
b
@NickSuite has the generally correct suitescript answer
if you are desperate to modify the native button, write a client script that overwrites the onClick of the button and add the script using a beforeLoad user event script