- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2017 05:23 PM
We are using the Service Portal for our ESS users and we have created email notifications with instructions in the bottom that will take our end users to the Service Portal homepage with instructions on how to find their incidents or requested items.
The reason why we setup it up this way instead of using the ${URI_REF} in the email notifications is because the ${URI_REF} will take the user to our non-service portal side for our instance.
What I am trying to do is to have a way to have a link take them directly to their incident or requested item in the Service Portal. I looked in the Docs and found this link: Link to content pages but using ${CMS_URI+ess/incident_detail} doesn't take them to the Service Portal it takes them to the ESS page. I modified it to ${CMS_URI+sp/incident_detail} but that doesn't work it just gives me an error saying "The page you are looking for could not be found".
How do I modify this ${CMS_URI+ess/incident_detail} so it will take the user to their incident or requested item in the Service Portal?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2017 02:46 AM
Here is the mail script
var url = '';
if(current.getTableName() == 'sc_request')
url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=sc_request&table=sc_request&sys_id=' + current.sys_id + '">' + current.number + '</a>';
else if(current.getTableName() == 'sysapproval_approver')
url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=approval&table=' + current.getTableName() + '&sys_id=' + current.sys_id + '">' + Link + '</a>';
else
url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=ticket&table=' + current.sys_class_name + '&sys_id=' + current.sys_id + '">' + current.number + '</a>';
template.print(url);
And in email notification call the mail script as belo
Click here to view : ${mail_script:NAME_OF_MAIL_SCRIPT}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2017 05:42 PM
I'm not sure if there is OOB URI that can provide you the needed functionality.
But you can achieve this simply by using a mail script with the below url
sp?id=ticket&table=incident&sys_id=1212c3030f883200e1f30dbce1050e6b all you need to do is pass the table and sys_id of the record dynamically so that you can use the same mail script for Request items too
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2017 05:54 PM
How do I pas the table and sys_id dynamically?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2017 05:57 PM
in mail script use
current.getTableName() and current.sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2017 06:31 PM
Hi DVP
I am not so great in scripting. How would i script this in the mail script.