- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 11:59 PM
Hello all,
I have a case where If we select a particular group it is getting assigned automatically to the groups manager in assinged_to section but the Manager is not Active. We want to add that group to assignment group but we dont want Inactive manager to auto assign to that assigned_to field. How to achieve this?
TIA 🙂
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 01:39 AM
Hello @radt
You dont need to do it manually.
You can automate this using a business rule or a scheduled job.
- You can navigate to the sys_user table, and add the column Manager. This will show you all the user who have the manager set as the inactive user.
- You can navigate to the sys_user_group table, and add the column Manager. This will show you all the groups that have the manager set as the inactive user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 12:54 AM
These are Matching rules. Not Business rules. I felt they are related to the issue so mentioned this in our conversation. I dont specifically see any BR or Client script for them. I will re-check again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 01:10 AM
There is a client script : Auto Fill Assigned To field
Which is with OnChange of : Assignment group field:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
ScriptLoader.getScripts('sn_hr_core.utils_ui.jsdbx', function(){
getGlideRecord('sys_user_group',newValue , setAssignTo);
});
function setAssignTo(group){
if (group)
g_form.setValue('assigned_to', group.manager);
}
}
If we have such Client script do manager gets assigned even if he is not active ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 12:58 AM
Did you identify which script is doing that?
Possibly once you identify that you can decide which active group member you need to add
Also please check with your customer do you really want to assign that case directly to some user since usually agents belonging to that group pick the task/case on their own
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 01:09 AM
There is a client script : Auto Fill Assigned To field
Which is with OnChange of : Assignment group field:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
ScriptLoader.getScripts('sn_hr_core.utils_ui.jsdbx', function(){
getGlideRecord('sys_user_group',newValue , setAssignTo);
});
function setAssignTo(group){
if (group)
g_form.setValue('assigned_to', group.manager);
}
}
I see this is the one which is doing this. If we have such Client script do manager gets assigned even if he is not active ??

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 01:22 AM
Hello @radt
I see that the script loader mentioned here - sn_hr_core.utils_ui.jsdbx is not exposed to customers or admins.
Am assuming this needs to be fixed in the script loader.
I would recommend creating a case with support, and getting more clarity as to if there is any condition added in the script to check for inactive users set as managers for groups.
I however have a question for you:
If an user is inactive in the system, shouldn't all dependencies be removed where this user id is used?
Are more importantly in situations like this, where the user is an assignment group manager, or in other cases, the user could be a supervisor or manager to anothe user.