Pass two event parameters that send information about a record or related records from a work-flow to a notification.
Before you begin
Role required: events_admin
Procedure
-
Navigate to and define a new event to call.
-
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.
-
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);
Example
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.
}