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

Harsha Pappala
Kilo Sage

Hi, 

In the email notification, you can use the insert link button on top. Highlighted in pic below and paste the part of the URL after .com 

It would go something like this

sp?id=approval&table=sysapproval_approver&sys_id=..

find_real_file.png

Mark the answer as useful, if it works.

Cheers 

Harsha