If requester is part of approval group want to skip approval for
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2024 05:18 AM
Hi All,
I have a workflow where I'm using the "Approval -user" activity. I want to skip the approval for the requester if he is part of of group .
Currently, my script works fine for checking if the requester is part of the approval group and skipping his approval
trigger approvals to other users but same logic i want to implement for "approval group" activity but not working . Can anyone suggest the best approach to achieve group approvals in this Scenario?
script
var answer=[];
var requester='123343443333';
var Group='fdhfjksdhkjfkdhkj';
var groupMemberGR = new GlideRecord('sys_user_grmember');
groupMemberGR.addEncodedQuery("user!="+requester+"^group="+Group);
groupMemberGR.query();
// Remove the user from the group if found
while (groupMemberGR.next()) {
answer.push(groupMemberGR.getValue('user'));
}
Thanks in advance for your help!
Regards,
Srinath.
My requirement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 01:55 PM
Hi Srinath,
Did you find the solution? Am looking for the same configuration.
Regards,
SN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2024 01:53 PM
"best" is really what works for you. I try to avoid scripts where possible, so for this case we actually created a subflow that identifies the user as part of a group, then passes the result back to the flow to create/avoid the approval.