Using ${URI_REF} For a Parent Record

User398360
Kilo Contributor

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}

 

6 REPLIES 6

Indrajit
Mega Guru

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}

https://www.servicenowguru.com/system-definition/email-notifications-system-definition/email-links-u...

mark Correct and Helpful if applicable.

Regards,

Indrajit.

 

Swapnil Soni1
Giga Guru

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