Need to restrict users to change assignment group on catalog task for a particular catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 02:02 AM
Hi Community,
I want to restrict users to change the assignment group to any other group on catalog task for a particular catalog item.
I just want that the catalog task which is getting auto generated using flow and getting assigned to a particular assignment group have access to that. For other groups or group members it shouldn't be editable.
Thanks,
Poorva Bhawsar
- Labels:
-
Request Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 02:13 AM - edited 10-12-2022 02:14 AM
You can create before/update Business rule on Catalog task table with the following condition and script
Condition, Give your Item
Request - Requested Item fields - Item is <give your Item'
AND
Assignment group changes
Script
if(! (gs.getUser().isMemberOf(current.getValue('assignment_group')))) //If current logged-in user is not member of the Assignmentgroup
{
gs.addErrorMessage('Only group member can modify the assignment group');
current.setAbortAction(true); //Abort the action
current.setValue('assignment_group', previous.getValue('assignment_group'));
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 04:24 AM
Hi Sai,
Its working only for the users who is not the member of other groups, if a user is a member of any group and he is changing it to that group then its allowing him to change the assignment group.
I want only those users who is member of a specific group lets say "Poorva Group", then only those members should be able to change it. Others should not be able to change the assignment group whether they are changing it to a group whom they belongs.
Thanks,
Poorva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2022 05:19 AM
Hi Poorva,
You can try the below Before Update BR:
if(! (gs.getUser().isMemberOf("Your_Group_Name"))) //If logged in user is not member of certain group
{
gs.addErrorMessage('Only members of Poorva Group can change the Assignment Group');
current.setAbortAction(true);
current.setValue('assignment_group', previous.getValue('assignment_group'));
}
I Hope this helps.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh