Using ${URI_REF} For a Parent Record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 10:53 AM
I'm creating a notification on the sn_customerservice_task table that triggers when a task on a case is assigned to a particular set of individuals.
In the notification, I want a clickable reference to the task number, but also a clickable link to the original case number.
I am able to use ${URI_REF} and the task number is correctly linked.
However, when I try to use URI_REF for the parent case number, the link is not available and shows blank in the notification preview.
This is what I'm attempting:
Original Case Number: ${parent.number.URI_REF}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 12:36 PM
Hey Will,
You can use the getLink function if you load the parent table as an object:
for EX:
var task = new GlideRecord('task');
task.get(current.task);
var link = task.getLink();
Or
${parent.URI} or ${parent.URI_REF}
mark Correct and Helpful if applicable.
Regards,
Indrajit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 01:22 PM
Hi,
Have you tried this
${task.URI} or ${task.URI_REF}
Scripting for Email Notifications - ServiceNow Wiki
Please mark correct or helpful if this helps.
Thanks
Swapnil