Pass event parameters from a work-flow to a notification

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 2분
  • Pass two event parameters that send information about a record or related records from a work-flow to a notification.

    시작하기 전에

    Role required: admin

    프로시저

    1. Navigate to All > System Policy > Events > Registry and define a new event to call.
    2. Create the activity step that calls the event from your workflow and assign the two possible parameters.
      These parameters can be references or fields on the record that triggered the workflow, such as current.number for the request item number. You can also dot-walk to records in other tables. The event then sends the parameters information to the notification that it triggers.
    3. Retrieve the parameters in the notification with email scripts by using event.parm1 and event.parm2.
      For example:
      
      var string = event.parm1.toString(); 
      template.print(string);
      

    Another example using Sys IDs gives you access to anything in the record that triggered the workflow. Use a script like this to send information about a change or request to support personnel, for example.
    
    var id = event.parm1.toString(); 
    var gr = new GlideRecord('sc_req_item'); 
    gr.get('sys_id', id); 
    if (gr.next()){
       // Do something.
    }