- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 06:28 AM - edited 02-21-2024 06:30 AM
Hello,
I have the below business rule, set on the incident, sc_task and sc_req_item table, it is here to prevent users from assigning to specific groups which is fine:
Filter conditions:
Advanced Script:
(function executeRule(current, previous /*null when async*/ ) {
if (!gs.getUser().isMemberOf(current.assignment_group)) {
gs.addErrorMessage("You are not authorised to assign to this group");
current.assignment_group.clearValue();
current.assignment_group.setDisplayValue('');
current.setAbortAction(true);
}
})(current, previous);
However I have noticed that if the assignment group is used within flows, it errors out as the business rule also prevents assignment here.
Is there a way to allow the flow to assigning tasks to these groups? Our flows are set to run as system user also, not user who initiates the flow.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 09:14 AM
well, its working as expected. if there are any BRs written on table and flow designer flows used to updated and go against those rules it will throw an error.
You can go around this by a workaround of using a script action glide record script to update the assignment group and add a line gr.setWorkflow(false);
BR,
harshad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 09:14 AM
well, its working as expected. if there are any BRs written on table and flow designer flows used to updated and go against those rules it will throw an error.
You can go around this by a workaround of using a script action glide record script to update the assignment group and add a line gr.setWorkflow(false);
BR,
harshad