I wrote a user event to run on work order creation...
# suitescript
a
I wrote a user event to run on work order creation. If I manually create a work order, the script runs as expected. However when work orders get generated on the approval of a sales order, the script is not running. I have set the execution context to all on the script deployment, and the audience to all roles and employees and to execute as admin. Any suggestions why it is not working?
b
not everything netsuite does triggers user event scripts, especially if it does not fit into the existing context.UserEventType
a
So I might have no way to get my script to run? blobweary
After submit works so I suppose I could use that
c
@Azi Yeah, I've seen this happen plenty of times. AfterSubmit will work on that record.
a
👍
z
I am not sure, but can bet that one user event couldn't trigger another user event... I suspect that approval sales order, in the background trigger some user event (sales order context) which create work order... I had same same situation with sublist of custom record.. If I create custom record through UI, user events will be executed... but if I add lines in sublist (each line is one custom record) user events would not be executed, and I have to process all logic through client script of master record