- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 09:58 PM
Hi,
I have a scheduled job which has some values. I need to bind a particular value to the notification link from the scheduled job so that i can set that value on the catalog form field.
What is the process i am doing?
1. I have created a scheduled job.
2. I am passing the value through an event param
gs.eventQueue('abc_event_name','','22.2'); //22.2 is the value that needs to binded on the notification link
3. I have added event param on the link so that i can access this through an onload client script.
https://abc.service-now.com/sp?id=sc_cat_item&sys_id=84d952014f43012361ab123df699xyz9&iteration={event.parm1}
I don't see the event param on the url when i click on the email notification link.
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 10:10 PM
Hey,
It is possible to pass.
Few things to check:
1. For event queue function, can you pass object as 2nd parameter and if you don't want to pass any additional parameter, keep it as "", but have 4 parameters
2. The notification should be the same table as the Event
3. For building the URL are you doing it in email script or notification?
If notification, do the following:
https://abc.service-now.com/sp?id=sc_cat_item&sys_id=84d952014f43012361ab123df699xyz9&iteration=${event.parm1}
If email script
"https://abc.service-now.com/sp?id=sc_cat_item&sys_id=84d952014f43012361ab123df699xyz9&iteration= "+ event.parm1
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 10:10 PM
Hey,
It is possible to pass.
Few things to check:
1. For event queue function, can you pass object as 2nd parameter and if you don't want to pass any additional parameter, keep it as "", but have 4 parameters
2. The notification should be the same table as the Event
3. For building the URL are you doing it in email script or notification?
If notification, do the following:
https://abc.service-now.com/sp?id=sc_cat_item&sys_id=84d952014f43012361ab123df699xyz9&iteration=${event.parm1}
If email script
"https://abc.service-now.com/sp?id=sc_cat_item&sys_id=84d952014f43012361ab123df699xyz9&iteration= "+ event.parm1
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 10:20 PM
Yes i did try and it displays as blank. Below is what i see through a notification.
https://abc.service-now.com/sp?id=sc_cat_item&sys_id=84d952014f43012361ab123df699xyz9&iteration=
How to achieve this using an email script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 10:36 PM
1. Create a "Notification email script" through app nav
2. Click New, give it a name for eg "get_url"
3. if you are planning to pass an URL, just write in script section:
var urlString = "https://abc.service-now.com/sp?id=sc_cat_item&sys_id=84d952014f43012361ab123df699xyz9&iteration= "+ event.parm1;
template.print(urlString);
4. Go to your notification and embed this email script:
${mail_script:script name}
Ref article:
https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/script/server-scripting/concept/c_ScriptingForEmailNotifications.html
https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/script/server-scripting/reference/r_ExScptEmlNtfn.html
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2022 10:11 PM