How to resolve error "Record Not Found" once clicking on Notification Link

Shivani Sahu
Tera Contributor

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.

find_real_file.png

1 ACCEPTED SOLUTION

Mahendra RC
Mega Sage

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

View solution in original post

12 REPLIES 12

AnubhavRitolia
Mega Sage
Mega Sage

Hi Shivani.

Can you please show the Email Notification Configuration you have done for this Link?

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023

Also share the screenshot of error you get even after you are logged in.

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023

Please find attached error snapshot which I've got while clicking on link 

Mohith Devatte
Tera Sage
Tera Sage

helllo @Shivani Sahu ,

Can you share the email script where you created this link ?

or any other source code in the notification you did for this link ?

please share those details and we will be able to help you