124. Approval activity is being bypassed in the Flow designer
Approval activity is being skipped due to the approvals not being in the same domain as the user submitting in the request.
Approval activity is being skipped while using domain separation plugin
Approval Workflow Skipping Approval Step due to Approval Group’s User’s domain
Expected behavior: The request should be pending approval from the approval group but request bypassed the group approval, this, in turn, approved/cancels the request
Solution:
Navigate to Script include : “”WorkflowApprovalUtils”
Locate the “getMembersOfGroup” method and replace query with queryNoDomain
getMembersOfGroup: function(groupID) {
var ids = [];
if (!groupID)
return ids;
var gr = new GlideRecord(‘sys_user_grmember’);
gr.addQuery(‘group’, groupID);
gr.addNotNullQuery(‘user’);
gr.addQuery(‘user.active’, true);
gr.query();
while (gr.next()) {
ids.push(gr.getValue(‘user’));
}
return ids;
},
https://medium.com/@LearnITbyPrashant/124-approval-activity-is-being-bypassed-in-the-flow-designer-0ea9767cbfb4?source=rss-d005fc598f0a------2