Can we pass event param to email notification link

Hari1
Mega Sage

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.

find_real_file.png

Thanks.

1 ACCEPTED SOLUTION

Aman Kumar S
Kilo Patron

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

Best Regards
Aman Kumar

View solution in original post

6 REPLIES 6

Yes i did try it and it displays as blank. Below is what i see.

https://abc.service-now.com/sp?id=sc_cat_item&sys_id=84d952014f43012361ab123df699xyz9&iteration=

Hi,

you didn't share how are you adding it in email body?

directly in email body or using email script?

share the screenshot

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader