How to add the link of the incident in the email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 08:48 AM
Hello community,
Coming to the work orders in Service portal. When the customers are emailed updates or notes or anything about the ticket it should have the ticket number and the link which leads to the particular incident.How should i proceed for this requirement.
Please share your ideas.
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 09:16 AM
You can use ${URI_REF} outside of a mail script. You can just add it inline below or above your mail script call in the notification.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 08:58 AM
If you add ${URI_REF} into your notification that will display as the Number of the current ticket and hyperlink to it. Are you wanting the work order email to show a link to a related incident on the portal? You can create a mail script and add it to your notification to link to it. Something sort of like this:
Mail script name: portal_link_to_ticket
Script: var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=ticket&table=' + current.sys_class_name + '&sys_id=' + current.sys_id + '">${number}</a>';
template.print(url);
This script sends a link for the current ticket similar to URI_REF but directs the user to the portal. Just update it to dotwalk to the related incident.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 09:03 AM
Hey,
should i write an new script in the email scripts and include the code above?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 09:21 AM
If you already have a mail script you should be able to add it into that and have the notification just do 1 call to it. If you wanted to split them out you can do that as well and have the notification call each one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 09:29 AM
My script is in the above comment . Can you please expand what changes should i make in that
Thank you.