url incident redirect

reyservicenow
Tera Expert

When a user receives an email notification that an incident has been assigned to their group, the link that takes you to the incident does not include the full ServiceNow navigation but only the incident window.

1 ACCEPTED SOLUTION

This is a link to an incident which preserves navigation ( note: I randomized the sys_id   in this example)


https://YOUR_INSTANCE_HERE.service-now.com/nav_to.do?uri=incident.do?sys_id=0dd233df0a234c7e00f3fe1f...



This is a link to an incident which does not preserve navigation:


https://YOUR_INSTANCE_HERE.service-now.com/incident.do?sys_id=086893c70a0a3c7e0060fe80d534506f



Here's a quick guess as some code that might help:



*** Warning: untested code follows.   Use at own risk ***



Replace


var link = current.getLink();



With


var link = "https://YOUR_INSTANCE_HERE.service-now.com/nav_to.do?uri=incident.do?sys_id=" + current.sys_id.toStr...



EDIT: Adding advice to allow this solution to adapt to the instance where it may run.   Instead of hardcoding the instance name in the URL, you can obtain it from the system property "instance_name".   There is a reference for how to do this at GlideSystem - ServiceNow Wiki  



It basically would go like this, replace the initial statement with these: ( caveat: untested code follows )



var instance = gs.getProperty('instance_name');


var link = "https://" + instance + ".service-now.com/nav_to.do?uri=incident.do?sys_id=" + current.sys_id.toStrin...




NOTE: Email notifications should be included in update sets.   If it's not there, maybe there's a problem with your "Application Scope".   Out of the box notifications are probably in the global scope.


View solution in original post

15 REPLIES 15

Valor1
Giga Guru

My guess is that the Notification has a Mail Script or some other non-OOB link built in it.



If you use ${URI} (displays as LINK) or ${URI_REF} (displays INC00100345), you should be taken to the full framed navigation.


ok where can i change this?



thanks


While the fully correct answer is "it depends".   But more than likely it is in one of your email notifications.


Use this link to view your email notifications for incident and see if you don't find it.




https://YOUR_INSTANCE_HERE.service-now.com/sysevent_email_action_list.do?sysparm_query=active%3Dtru...



Be sure to look in the tab named "What it will contain".


find_real_file.png


ok so incident_take_me_to_the_incident is the one now what?