Is it possible to customise a clickable link in a notification

RichardSaunders
Tera Guru

Are ${URI} & ${URI_REF} the only options to link through to a record. How would i configure something like "please click 'here' for approval". With 'here' linking to the relevant Change record.

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Richard,



You can do this. It requires a minimal amount of script.



You should find this reference helpful:


Scripting for Email Notifications - ServiceNow Wiki



Please note, that you do not need to construct a full path URL (which is handy when testing in dev and deploying to production.) The system is smart enough to recognize relative URLs and translate them in to full URLs in the final message. For example, a link like:



<a href="/incident.do?sys_id=ad102230db1222002e38711ebf96190b">Click here to open the incident</a>



Will get the https://instancename.service-now.com added to the front of it automatically.


http://wiki.servicenow.com/index.php?title=Email_Notifications


View solution in original post

7 REPLIES 7

FWIW, you don't need to put in the fully qualified URL. SN recognizes URLs on output and can make them instance independent. In other words, all this:



https://' + gs.getProperty('instance_name') + '.service-now.com



is not necessary.


Use the current.sys_id in place of the sys_id. Something like this:



template.print('<a href="/nav_to.do?uri=incident.do?sys_id=' + current.sys_id + '">' + current.short_description + '</a>');


David Stutter
Tera Guru

https://docs.servicenow.com/bundle/kingston-servicenow-platform/page/administer/reference-pages/reference/r_AdditionalProperties.html

 glide.email.override.url

 Sets the URL to use in emailed links in place of the instance URL. The URL should end with nav_to.do. An example value is: https://servicenow.customerdomain.com/production/nav_to.do. This property is suitable for customers who use custom redirect URLs for their instances.

  • Type: string
  • Default value:instance URL