- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2022 12:38 AM
Hi All,
I have created notifications for incidents and add link in the message content at last called "Take me to the incident" for users who wanted to view the record directly from the email. So after clicking the link we are getting one error called "record not found" only while logged in. link has open on the other browser and we have to logged In to see the record after login we gets that error. Once login then we tried to click on link its working fine user will get the records. I am not sure why its happening while logged In. Please share the inputs if anyone knows the issue, so that I resolve it.
I have attached notification content and link which I have added.
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2022 02:45 AM
Hello Shivani,
Please use the below code to set the Incident reocrd URL
Using only var link = "<a href='/incident.do?sys_id='"+current.sys_id+">Take me to the incident</a>"; will create an issue when user is not logged in ServiceNow and directly clicks the link from email.
var link = '<a href="https://' + gs.getProperty("instance_name") + '.service-now.com/incident.do?sys_id=' + current.getValue("sys_id") + '">Take me to the incident</a>';
Please mark my respsone as helpful/correct, if it answer your question.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2022 01:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2022 01:23 AM
can you try this in the first line ?
var link = "<a href='/incident.do?sys_id='"+current.sys_id+">Take me to the incident</a>";
and also while printing it just use
template.print(link);
Hope this helps
please mark my answer correct if this helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2022 06:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2022 02:45 AM
Hello Shivani,
Please use the below code to set the Incident reocrd URL
Using only var link = "<a href='/incident.do?sys_id='"+current.sys_id+">Take me to the incident</a>"; will create an issue when user is not logged in ServiceNow and directly clicks the link from email.
var link = '<a href="https://' + gs.getProperty("instance_name") + '.service-now.com/incident.do?sys_id=' + current.getValue("sys_id") + '">Take me to the incident</a>';
Please mark my respsone as helpful/correct, if it answer your question.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2022 06:08 AM
@mahendra
I have tried to put the same code but its not working, once clicking on the link its coming on new incident creation page