Click here to Approve Request online: ${URI} is taking to RITM page

Piyush291
Tera Contributor

Hi All,

I have created a notification on sys_approval table and "Click here to Approve Request online: ${URI}" is oob functionality which will take you to the approver page to Approva/Reject. But it is taking to RITM page.

find_real_file.png

Ques 2. I have created one Rejection notification on workflow which runs on sc_req_item table. Now i want to display the Rejection reason comments which approver add on comments section during rejection. Any possibilty how i can achieve this both issues.find_real_file.pngThanks in advance.

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

please find responses below

1) are you using sso? check link below for more help

https://community.servicenow.com/community?id=community_question&sys_id=ccbacb2ddb5cdbc01dcaf3231f96...

2) you will have to write email script for that; query sysapproval_approver table for this RITM and state as rejected; pick up the comments and pass in email body

sample script below

(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {

var gr = new GlideRecord('sysapproval_approver');

gr.addQuery('approval_for', current.sys_id);

gr.addQuery('state','rejected');

gr.query();

if(gr.next()){

template.print('Reason for rejection is: ' + gr.comments);

}

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

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Karan 

Hope you are doing good.

Did my reply answer your question?

If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader