I need to create a business rule to auto approve a RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2023 01:03 PM
Hi All,
I want to auto-approve an approval task if the approver is also the Requestor.
For example, if the workflow has opened_by manager approval, and now the Manager is submitting a request on behalf of a team member, the RITM should be auto-approved.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2023 02:09 PM
Below script should work or could be adapted to your use case. But please keep in mind, approvals are there for a reason. So only do this for example if the approver requests something for someone else, but not for himself.
(function executeRule(current, previous /*null when async*/) {
var user = current.opened_by.toString();
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('document_id',current.sys_id);
gr.addQuery('approver', user);
gr.addQuery('state', 'requested');
gr.query();
if (gr.next()) {
gr.state = 'approved';
gr.comments = 'Automagically approved as approver and requestor is the same';
gr.update();
}
})(current, previous);
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 11:09 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 11:54 PM
Hi @Vijayenthiran S,
I think your condition will not work. Try it without a condition first to see if the script works.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 04:21 AM - edited 09-24-2023 08:05 AM
cool, thx
Remember that while these services can be helpful, it's important to use them responsibly and ethically. Always review and edit the work you receive to make it your own and avoid academic misconduct. Additionally, consider your budget and deadlines when choosing an essay writing service page, as prices and turnaround times can vary.