Just a tip for anyone else trying to create a trigger on SOP_Password.
Make sure you register your script as TRIGGER_AFTER_ORIGINAL, otherwise the action will still work.
I had tried "abort script", "reject script", and also tried throwing OUT_Err = 1 before both the abort and reject - and nothing prevented the delete/void of an order.
I then finally tried all the options abort/reject script with and without setting OUT_Err to 1 and found the following combinations:
TRIGGER_AFTER_ORIGINAL
abort script; -> still allows action
OUT_Err = 1; abort script; -> prevents action
reject script; -> prevents action
OUT_Err = 1; reject script; -> prevents action
Hopefully that can save someone else some headaches.
Make sure you register your script as TRIGGER_AFTER_ORIGINAL, otherwise the action will still work.
I had tried "abort script", "reject script", and also tried throwing OUT_Err = 1 before both the abort and reject - and nothing prevented the delete/void of an order.
I then finally tried all the options abort/reject script with and without setting OUT_Err to 1 and found the following combinations:
TRIGGER_AFTER_ORIGINAL
abort script; -> still allows action
OUT_Err = 1; abort script; -> prevents action
reject script; -> prevents action
OUT_Err = 1; reject script; -> prevents action
Hopefully that can save someone else some headaches.