Approval needs to be triggered to the manager of the approver if the approver and requestor are same
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 04:48 AM
Hi Team,
I have a requirement where
Requestor should not be able to approve his own request. Approval workflow should trigger to the manager of the approver if the approver and requestor both are same person.
Thanks in Advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2024 05:45 AM
How is the approver determined in the first place?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 01:15 AM
Approver should be the requestor manager, but if the requestor is himself the approver approval should go to approver manager. Hope I am able to answer your question if there is anything else please let me know.
Also if it will be more helpful if you can elaborate your question
Thanks in Advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2024 01:26 AM
Hi @k_Mounika
Use a “Condition” check to determine if the approver (current.approver) is the same as the requestor (current.opened_by).
use script:
var managerSysID;
if (current.opened_by == current.approver) {
// Assuming 'opened_by' and 'approver' are user references
var userGr = new GlideRecord('sys_user');
if (userGr.get(current.opened_by)) {
managerSysID = userGr.manager.toString(); // Get manager’s sys_id
}
}
Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me..
- Keep Learning
Thanks & Regards
Deepak Sharma