Click here to Approve Request online: ${URI} is taking to RITM page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2019 09:41 PM
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.
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.Thanks in advance.
- Labels:
-
Scoped App Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2019 10:00 PM
Hi,
please find responses below
1) are you using sso? check link below for more help
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2022 11:21 PM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader