0

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:see here

Can anyone tell me where I can get this context value during runtime?

DomMa
  • 153
  • 1
  • 11

1 Answers1

0

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.

Deployment Example

Simon Delicata
  • 401
  • 5
  • 15
  • Good idea - same outcome. I updated the deployment as you suggested and ran a mass update while logging the UserEventType. Script still got triggered, eventtype still xedit. Apparently NetSuite doesn't really use this 'Custom Mass Update' attribute. – DomMa Feb 08 '23 at 09:46