- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2019 08:14 AM
When I use the activity stream, the user receives a notification "You have been tagged in ServiceNow".
The link shows the ticket number, but the hyperlink takes me to the notification record rather than the incident record.
How can I fix this so the user can use the hyperlink rather than search for the ticket number?
--------------
Hello ${user.first_name},
You are receiving this email because ${user_from} tagged you on a ticket. To view the tag, click this link: ${URI_REF} .
Solved! Go to Solution.
- Labels:
-
Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2019 12:59 PM
Hi, I can’t see an OOB notification or email script that contains ‘tagged’ in a vanilla NewYork instance,
perhaps it is dependent on a plugin?
Assuming the functionality is similar to notification ‘Activity Stream @Mention Email’ ?
nav_to.do?uri=sysevent_email_action.do?sys_id=150055909f021200d5f9b3e2957fcf23
We can use ‘Activity Stream @Mention Email’ as an example
The body of the notification is populated via an email notification script ${mail_script:ng_activity_mention_body}
/nav_to.do?uri=sys_script_email.do?sys_id=381391d09f021200d5f9b3e2957fcf1d
I don’t think that you can use URI_REF in the script as you cannot dot.walk to the task record, but you can create your own URL and the references to the underpinning task are already provided via the glide query ‘recordGR’, so you can leverage this object.
You would need to update the email script to include something like this .... (untested)
var instanceURL = gs.getProperty('glide.servlet.uri'); // get your instance URL
template.print("<p style='color: #424E5B;margin: 0 0 12px;line-height: 26px;margin-bottom: 12px'>You have been mentioned by " + current.user_from.name + ' in <a href="' + instanceURL + 'nav_to.do?uri=' + recordGR.sys_class_name + '.do?sys_id=' + recordGR.sys_id + '">' + recordGR.number + '</a></p>';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2019 12:59 PM
Hi, I can’t see an OOB notification or email script that contains ‘tagged’ in a vanilla NewYork instance,
perhaps it is dependent on a plugin?
Assuming the functionality is similar to notification ‘Activity Stream @Mention Email’ ?
nav_to.do?uri=sysevent_email_action.do?sys_id=150055909f021200d5f9b3e2957fcf23
We can use ‘Activity Stream @Mention Email’ as an example
The body of the notification is populated via an email notification script ${mail_script:ng_activity_mention_body}
/nav_to.do?uri=sys_script_email.do?sys_id=381391d09f021200d5f9b3e2957fcf1d
I don’t think that you can use URI_REF in the script as you cannot dot.walk to the task record, but you can create your own URL and the references to the underpinning task are already provided via the glide query ‘recordGR’, so you can leverage this object.
You would need to update the email script to include something like this .... (untested)
var instanceURL = gs.getProperty('glide.servlet.uri'); // get your instance URL
template.print("<p style='color: #424E5B;margin: 0 0 12px;line-height: 26px;margin-bottom: 12px'>You have been mentioned by " + current.user_from.name + ' in <a href="' + instanceURL + 'nav_to.do?uri=' + recordGR.sys_class_name + '.do?sys_id=' + recordGR.sys_id + '">' + recordGR.number + '</a></p>';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2019 06:32 AM
thanks!