- 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
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-18-2019 04:06 PM
Hi
When we try to implement portal link on sc_Request table fwithin the notification
it's showing as undefined url in notification
url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=sc_request&table=sc_request&sys_id=' + current.sys_id + '">' + current.number + '</a>';
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2019 05:24 AM
I don't see any syntax error in the script. Is the mail script used in notification on sc_request table?
can you share some screenshots ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2019 02:40 PM
Actually that worked for me the issue was with wrong back_end name of field.
Thanks though