Hi, Is it true that we can't cancel an order through Suite Script ?
m
michoel
08/10/2020, 12:59 PM
You can close an order but as far as I know the only (unsupported) way to cancel via script is to call the url that the browser navigates to when you click cancel in the UI
a
AK47
08/10/2020, 2:11 PM
You can set the quantity of each item to 0
AK47
08/10/2020, 2:11 PM
I add a custom line field for cancel quantity so i can show what the qty was there before
n
netsuite_insights
08/10/2020, 2:36 PM
You can use this undocumented SuiteScript 1.0 function which is what NetSuite calls internally when you cancel an order cancel_approve_order(<record_id>, 'cancel');