How to pass parameter in event

Community Alums
Not applicable

gs.event queue

2 REPLIES 2

Harshal Aditya
Mega Sage
Mega Sage

Hi Kush,



Pass sys_id like current.<var name>


Ujjawal Vishnoi
Mega Sage
Mega Sage

Hi Kush,



Please refer the below documentation.


gs.eventQueue("incident.updated", current, gs.getUserID(), gs.getUserName());

The gs.eventQueue function takes the following parameters:


Field


Input Value


NameThe name of the event triggered, set in quotation marks
RecordThe record referenced when the condition in the script evaluates to true. Usually this is expressed as current, meaning the current record the business rule is working on. If the business rule is being triggered as part of a scheduled job, use a GlideRecord argument in its place.
Parm1Passes a string value. Notification events pass the Sys ID of the user with the gs.getUserID() method. Other scripts can reference this string value as parm1 using the format ${event.parm1}.
Parm2Passes a string value. Notification events pass the user name with the gs.getUserName() method. Other scripts can reference this string values as parm2 using the format ${event.parm2}.

Advanced view fields on the notification form have these -


Event parm 1 contains recipientSelect this check box if the event parameter 1 contains one or more email recipients (in a comma separated list). This field is visible only when theSend when field is set to Event is fired.
Event parm 2 contains recipientSelect this check box if the event parameter 2 contains one or more email recipients (in a comma separated list). This field is visible only when theSend when field is set to Event is fired.

Also you can use these in your email scripts -


'event.param1' and 'event.param2' to get their values


Check this - Event Parameters Mail Script




Hope this helps.



Regards


Ujjawal