${URI_REF} is not going to the direct record

SParker12
Tera Contributor

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?

SParker12_1-1687377984772.png

 

 

 

5 REPLIES 5

oharel
Kilo Sage

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

SParker12
Tera Contributor

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

 

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.

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?