- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2019 07:02 AM
Hi All,
Can someone help me to correct email script for RITM Number Link.
My notification is running on Catalog Task table. Whenever An RITM is commented, An email is getting triggered I want to add RITM link of service portal in email notification.
Thanks And Regards,
Meenal Gharat
Solved! Go to Solution.
- Labels:
-
Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2019 08:22 AM
Hi All,
I have identified a way and it is working like a charm.
So, Below is my code which worked.
(function runMailScript(current, template, email, email_action, event) {
var url='';
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id',current.request_item);
gr.query();
if(gr.next())
{
var sysid = gr.sys_id;
gs.log(sysid+ 'Get sysid');
template.print('<a href="enter your portal url sys_id='+sysid+'">' +gr.number+ '</a>');
}
}
)(current, template, email, email_action, event);
Thank you,
Meenal Gharat

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2019 07:05 AM
You open the notification and you can directly select the RITM instead of catalog task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2019 07:31 AM
Hi Vinoth,
Thanks, for your response we are using Catalog Task because we have add Task Number as well in the notification.
I have tried using below email script.
var gr = new GlideRecord('sc_req_item');
gr .addQuery('number',sys_id);
gr.query();
if(gr.next())
{
template.print('<a href="/ess?id=ticket&table=sc_req_item&sys_id ='+gr.sys_id+'">' + gr.number + '</a>');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2019 07:36 AM
Hello Meenal
You need to use:
${URI} in email body to get RITM LINK:
REFERENCE:
Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2019 10:18 AM
Hi Abhishek,
Appreciate your help, but my Notification is on Catalog Task.
So this will give me Task link.
I also tried ${request_item.URI_REF}
This is giving RITM link but it is taking me to ITIL View. I want to redirect it to Portal View.
Thanks and Regards,
Meenal