Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Approval Link for the Service portal through email script

Shweta Kasbe1
Tera Contributor

Approval Link for the Service portal through email script

3 REPLIES 3

Musab Rasheed
Tera Sage

Hi,

Please follow steps there in below link.

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0684584

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

Thanks @Musab Rasheed But I want to display current number in the link.

Have used this link->var url=<a href="https://dev96458.service-now.com/sp?id=approvals" >Link</a>'

I want in this way Like the current number is displaying find_real_file.png

But I am getting as this:-find_real_file.png

Pls guide me in this how can get the current number of particular ticket.

Notification is on which table? If Approval table then you nee a mail script as below

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,

/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,

/* Optional GlideRecord */ event) {

  var approvalrecord=current.sysapproval.number;//added

  var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=ticket&table=' + current.sys_class_name + '&sys_id=' + current.sys_id + '">approvalrecord</a>';
//changed Link to approvalrecord

  template.print(url);

})(current, template, email, email_action, event);