${URI_REF} is not going to the direct record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 01:06 PM
Hello,
I'm working on creating an email notification to trigger when a user gets mentioned in the activity stream. However, when I use ${URI_REF} and I preview the notification it list the Document ID and takes me to this page.
How am I able to fix this to take the user to directly to the record they were mentioned in?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 01:31 PM
Hi,
I would use an email script. Something like this:
In the notification:
${mail_script:redirect_to_incident}
then the script:
template.print('<a href=nav_to.do?uri=sc_req_item.do?sys_id=' + current.document_id + '">LINK</a>');
You need to test this, of-course...
Hope it helps
harel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 02:00 PM
hello,
thank you for your suggestion. I tried it and this is what it says
Email script render error: email script [ redirect_to_incident ] does not exist

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 02:36 PM
Hi @SParker12,
The @oharels suggestion should work (maybe with a different table in the url, since your screenshot was related to incident).
Kindly review how to create a mail script here, because the message you are getting means, you did not create the mail script correctly, or named it differently then the way you are calling it in the notification.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2023 05:34 PM
Thank you, I will check out the link. But I do have a question, I would want the email notification to trigger anytime a user gets mentioned in an activity stream such as tasks, incidents, problems, and etc. and not for one table. How can I get it todo that? Would the link I use in the script be for a specified table?