Add RITM Number Link on email notification which runs on Catalog Task

Meenal Gharat
Giga Guru

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

 

1 ACCEPTED SOLUTION

Meenal Gharat
Giga Guru

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

View solution in original post

6 REPLIES 6

Mike Patel
Tera Sage

try doing 

${current.request_item.URI_REF}

Meenal Gharat
Giga Guru

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