- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 06:06 AM
Hi,
I need to send a notification to the change requester and also all the approval groups when a change request approval gets rejected by any one of the approvers from the approval groups. I am having 2 issues here.
1. On 'Approval' table, I cannot pick 'requested_for'
2. I'm using the below mailscript to display 'comments' however it's not working.
var notes;
var appr = new GlideRecord('sysapproval_approver');
appr.addQuery('sysapproval',current.sys_id);
appr.addQuery('state','rejected');
appr.query();
while (appr.next()) {
var je = new GlideRecord('sys_journal_field');
je.addQuery('element_id', appr.sys_id);
je.addQuery('elements', 'comments');
je.addQuery('name', 'sysapproval_approver');
je.query();
if(je.next()){
notes = je.value;
}
template.print('<p>Approver: ' + appr.approver.getDisplayValue() + '</p>');
template.print('<p>State: ' + appr.state + '</p>');
template.print('<p>Comments: ' + notes + '</p>');
template.print('\n');
}
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 06:39 AM
There is already an OOB notification called Change rejected. You may just need to modify it a little as it is going to the assigned to instead of the requested for.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 06:39 AM
There is already an OOB notification called Change rejected. You may just need to modify it a little as it is going to the assigned to instead of the requested for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2018 08:05 AM
Thank you very much. I'm fairly new to Servicenow and didn't realise that an OOB notification is existing for a change reject. It's working fine now.