One more question, sorry. Anyone knows how to handle pressing standard "Close Order" button and add some logic and checks?
n
NickSuite
12/12/2019, 1:55 PM
Did you check the user event type?
d
Dmitry Masanov
12/12/2019, 1:56 PM
Yes, but it's not triggering any userEvent functions
n
NickSuite
12/12/2019, 1:56 PM
There is no event for Close that will trigger Userevent.
NickSuite
12/12/2019, 1:56 PM
What you can do is add a custom button, do your logic, and then close the sales order by closing the line items.
d
Dmitry Masanov
12/12/2019, 1:57 PM
Yep, thank you!
b
battk
12/12/2019, 2:38 PM
@NickSuite has the generally correct suitescript answer
battk
12/12/2019, 2:40 PM
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