- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 12:33 PM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 01:48 PM
This is a link to an incident which preserves navigation ( note: I randomized the sys_id in this example)
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 01:38 PM
The issue is surrounding the current.getLink() function. It returns a URL that goes directly to incident.do instead of nav_to.do?uri=incident.do. The experience for the client is a webpage that does not include the navigation menus on the top and left. The desire is to inject into what is returned by current.getLink() the nav_to.do so the navigation is returned.
Thoughts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 01:48 PM
This is a link to an incident which preserves navigation ( note: I randomized the sys_id in this example)
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 02:04 PM
this redirected back to the the incident with the nav. in it. so it did work
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 04:12 PM
Thank you for your response. But I still have a question. Is the only way to create the URL is manually? The problem with this is that I cannot capture this in an Updateset and any cloning of the instance would need to be updated to work in different instances. There has to be a way to this and prevent this type of issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2017 05:05 AM
var link = current.getLink();
link = link.replace("instance.do?","nav_to.do?instance.do%3F")
Thoughts?