How do I add an link in a notification that directs to a Portal?

iamright
Giga Contributor

I currently use the "Approved, Rejected" script in a notification. How do I add links for an Approval Request notification that links to the Portal page instead? i want all approvals to be done in a portal.

Here is my link to a current approval record in the Portal.

https://domain.service-now.com/content_request?id=approval&table=sysapproval_approver&sys_id=d32d5d0...

What's the code inside the notification?   Not sure how to get the sys_id to change based upon the approval record.

1 ACCEPTED SOLUTION

danzak
ServiceNow Employee
ServiceNow Employee

When sending a notification, you can specify links within your instance using ${URI_REF} and ${URI+...}. URI_REF will create a link directly to the record that triggered the notification to get sent. That sounds like what you need.



This page gives a pretty good overview:


Embedded:Specifying a URI Field - ServiceNow Wiki



Also, if you aren't using it, the "Preview Notification" button on Notification can really help when testing these link variables.


View solution in original post

8 REPLIES 8

This is the KA for adding email scripts.   However, I don't have emails scripts under system policy.   I've also looked to see if I missed a plugin.



JavaScript in emails


Hi Matthew,


This is listed under System Notification --> Notification Email scripts



find_real_file.png


I get



From this line:    



template.print('<a target="_blank" href="'+url+'"'>'+displayValue+'</a>');