Same workflow triggering on different entrypoints
I’m new to suitescript and even newer to workflows and I’m hoping I can get some help understanding these triggers.
I want to be able to catch my orders that have items with units and set them to Pending Approval. I have a workflow action script to simply read the lines of the order and return a 1 if an item with units is found. This is working perfectly on orders that are made automatically by a dropship user event script, but not for orders created from the userinterface.
I have my script set to run on the exit of the Initiation state, but I’m confused by the differing results. For the dropship event exit is running under aftersubmit. For the create event the exit is running under before load and so the newRecord data is not available for my script.
I’m just wondering why these two events are behaving this way. I hope this makes sense.
That would be because the dropship event type is only triggered during after submit entry point. There is no before submit or before load entry point for dropship events. The user interface event type is more normal and triggers all 3 entry points.
Relevant suitescript page for user event entry points: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4490073437.html