Rejection comments are not showing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi,
Rejection comments are not attaching in the email notification for Requested Items
Notifications:
Approval Rejected - OOTB notification, It is not working
Approval Rejected By Other - OOTB notification, It is not working
Both above are on sysapproval_approver table
Comment left on request - OOTB notification, Rejection comments are showing here.
On sysapproval_approver notification rejection comments are not showing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi @Gopal14
When a request is submitted for approval and once is approved at first and then it goes to 2nd level approval and when the 2nd level approver rejects the target record the email is triggered but the rejection comments are unavailable to be included in the notification. This works fine when the first level approver rejects the article.
Can you confirm , for your case , it is 1st level approval?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi @Gopal14
Just try once with email script
Navigate to sys_script_email.list
create a new record .
name :get_rejection_comments
and call it in your notification using ${mail_script:get_rejection_comments}
sample script:
var rejectComment = new GlideRecord('sys_journal_field');
rejectComment.addQuery('element_id', current.sys_id);
rejectComment.addQuery('element', 'comments');
rejectComment.addQuery('name', 'sysapproval_approver');
rejectComment.orderByDesc('sys_created_on');
rejectComment.query();
if(rejectComment.next()){
template.print('Rejection Comments: ' + rejectComment.value + '\n');
}
Note: Ensure the notification triggers after the state changes to rejected
