Basis checkbox Prevent or Allow Group's Manager Assignment as Assigned to
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 08:46 AM
Dear Team,
I need help with the below requirement,
There is a checkbox (Prevent Manager assignment) on the sys_user_group table.
If this checkbox is True, then on INC record the Group that already assigned in the 'Assignment Group' field, it checks if that checkbox 'Prevent Manager assignment' is true then 'Assigned to' does not display the name of the associated assignment group's manager OR manager is not available for selection as assigned to for that particular INC record.
If the checkbox is false then 'Assigned to' will display the name of the associated assignment group's manager OR manager is available for selection.
Please help me with the script to achieve this.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 09:55 AM
Hi,
Two things to consider here.
Firstly, there are numerous other things to configure/help when thinking of assignment. For example Assignment rules. If you do some specific/custom filter query on the assigned to field, there is a big risk you eliminate the usage of these other tools available.
Second, let's say you have some logic in place to filter out results based on your requirement, what should happen if a INC is created, and an assignment group is set. Then after that, the selected group is changed to enable the "prevent manager assignment" is set to true. What should happen to this (and other existing) INC that now are "wrongly" set assigned?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 09:59 AM - edited 02-26-2024 10:00 AM
As per ServiceNow OOB configuration , Group manager won't be shown in the reference list if he is not the member of the group.
If the manager is member of group and if the manager should not be considered in the reference list then you need to add an Advanced reference qualifier on the 'Assigned To' field.
In the script include which should be called in the reference qualifier you need to verify if 'Prevent Manager assignment' filed on the group is True/False if false then you can return all the group members ,if 'Prevent Manager assignment' field is set to True you can exclude group manager and return all other group members
Let me know if you need help to configure the reference qualifier and script include