Schedule job to cancel RITM if approval is pending with Inactive approver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2020 01:09 AM
Hi All,
I have a requirement where I have to create a job which runs daily to check all such approvals which are pending with inactive approvers. Below condition should be checked:
1)Approval is in 'requested' state and is pending with Inactive user
2)This is the only approval triggered in the RITM. This should not be a part of group approval.
3)In case this is the only User approval triggered in the RITM, then this approval should be set as 'Cancelled' and the corresponding RITM also set as 'Closed Incomplete'. User should get a notification that request has been 'Closed incomplete' as approver is no longer in system, please raise new request.
Please help on this
--
Thanks,
Geeta Dhami
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2020 07:40 AM
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('approver.active=false'); // Copy Query rom List View