Mail script that provide RITM hyperlinks, from Approval notification, and from sc_task notification

Sai vsk
Tera Expert

Hi,

I have created a Approval Notification which has to include RITM hyperlink(i.e when clicking that link it has to open the particular RITM in service portal). Help me with the script. The URL of the form is mentioned below.

 find_real_file.png

 

1 ACCEPTED SOLUTION

Suseela Peddise
Kilo Sage

Hi,

In order to include RITM link (opens on portal) on approval notification, please use below script in notification email script

var gr = new GlideRecord("sc_req_item");
gr.addQuery("sys_id", current.sysapproval);
gr.query();
if(gr.next()) {
var link = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=ticket&table=' + gr.sys_class_name + '&sys_id=' + gr.sys_id + '">'+gr.getValue('number') +'</a>';

template.print(link);

}

and use below line in the notification body

${mail_script:Portal_link_request} //here , Portal_link_request is the email script name

 

If I have answered your question, please mark my response as correct and/or helpful.

Thanks,

Suseela P.

View solution in original post

5 REPLIES 5

Suseela Peddise
Kilo Sage

Hi,

In order to include RITM link (opens on portal) on approval notification, please use below script in notification email script

var gr = new GlideRecord("sc_req_item");
gr.addQuery("sys_id", current.sysapproval);
gr.query();
if(gr.next()) {
var link = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=ticket&table=' + gr.sys_class_name + '&sys_id=' + gr.sys_id + '">'+gr.getValue('number') +'</a>';

template.print(link);

}

and use below line in the notification body

${mail_script:Portal_link_request} //here , Portal_link_request is the email script name

 

If I have answered your question, please mark my response as correct and/or helpful.

Thanks,

Suseela P.

Hi,

Thanks it is working.

You are welcome @Sai vsk . 

Please mark my response as correct and/or helpful so that the thread will be closed.

 

Thanks,

Suseela P.

Hi @Sai vsk , 

As per your recent reply, you have mentioned the solution I have provided is working fine.

So, please mark my answer above as the correct one so people know this has been taken care of and this thread will be closed.

 

Thanks,

Suseela P.