Sample code to get the Mass-update trigger in a user event script

function afterSubmit(scriptContext) {

      try {

        log.debug("context", scriptContext.type);

        log.debug("runtime.executionContext", runtime.executionContext);

        if (scriptContext.type === scriptContext.UserEventType.XEDIT) { // XEDIT catches body field edits through mass-update

        // add code here
        }
      } catch(error){
        // Add error handling
      }

 

Leave a comment

Your email address will not be published. Required fields are marked *