I'm trying to prevent a userevent script from running in case of a mass update triggering it. Pretty simple task you might think. Usually the runtime.executionContext should give me the value that I'm looking for. What I'm expecting is runtime.ContextType.CUSTOM_MASSUPDATE but I keep getting the runtime.ContextType.USEREVENT.
What I need is the value that is correctly written in the system notes for this action:
Can anyone tell me where I can get this context value during runtime?
Instead of trying to code around the context, why not change the deployment to prevent execution under Custom Mass Update ?
Locate the Deployment, move to the Context Filtering tab and scroll through the Execution Context field looking for the Custom Mass Update option and deselect it.