Difference between Param1 & Param2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2018 12:48 AM
What is the difference between Param1 & Param2? I think both are used to store email recipients and passed to the event for triggering the notification. We can use Param1 everytime but when is Param2 is used? Why do we have 2 parameters for notifications?
Event parm 1 contains recipient | Select 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 the Send when field is set to Event is fired. |
Event parm 2 contains recipient | Select 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 the Send when field is set to Event is fired. |

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2018 01:18 AM
Hi Srini,
You can use then for other purposes specially when we are using the Email Scripts. Please see below example from Docs:
""
var id = event.parm1.toString();
var gr = new GlideRecord('sc_req_item');
gr.get('sys_id', id);
if (gr.next()){
// Do something.
}
""
Thanks,
Giri Guntoju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2018 02:50 AM
Hi Giri,
I understand that params can be used for scripting purpose also and I can use either of them. In the example also, it shows we can use Pharam 1 but it doesn't clarify any difference.
Why do we have 2 params? What is the significance ? There must be some reason behind it, I want to know the difference between them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2018 04:28 AM
Hi Srini
If you look at the events business rules on each table for example - incident events
you'll see a bunch of if statements eg.
if (!current.assignment_group.nil() && current.assignment_group.changes()) {
gs.eventQueue("incident.assigned.to.group", current, current.assignment_group.getDisplayValue() , previous.assignment_group.getDisplayValue());
So if the current assignment group is not nil and it has changed it will add an event called incident.assigned.to.group to the event queue
It will get created and param 1 will be the display value of the current assignment group and param 2 is the previous one.
Basically that rule passes an event with 2 parameters, the notification can be configured to use one as a recipient or you can just use the recipients listed.
You can also pass up to 2 parameters from a workflow when you use the create notification object. It's the same thing and tends to get used for task_sla based notifications
Regards