Change of Assignment Group names

NavinD
Tera Contributor

Hi,

 

As per internal governance and standardisation requirements, I need to align all Assignment Groups to a naming convention. For eg, Assignment groups belonging to group IT will have Grp-IT, etc. Will changing a name from the Active directory to reflect in ServiceNow have any impact?

 

I understand that there will be an impact if a logic is written to depend on a group name. I know of one such logic written within our org. How do I find out other such logics written. 

2 REPLIES 2

Isaac Vicentini
Mega Sage
Mega Sage

Hi @NavinD,

 

Yes, you are right, you need to be careful and perform a lot of testing to ensure that nothing has been impacted. Consider: business rules, scripts, flows, or conditions.

 

One way I like to check is through Studio:

 

1. Access System Applications -> Studio

2. Choose an application (it can be any for this test)

3. Navigate to Search -> Code Search

4. Fill in "assignment_group.name" to identify scripts that reference a group name, or search for a specific group name

5. All scripts that contain your term will appear

 

You can also create logic to run the script below for each group name:

// Find scripts referencing assignment_group.name
var gr = new GlideRecord('sys_script');
gr.addQuery('script', 'CONTAINS', 'assignment_group.name');
gr.query();
while (gr.next()) {
  gs.print('Script Include/Business Rule: ' + gr.name + ' | Table: ' + gr.getValue('collection'));
}

 

With these steps you can identify where there is logic with the group names to:

  • Business Rules

  • Script Includes

  • Catalog Client Scripts

  • Flow Designer Actions

  • UI Policies

  • Scripted REST APIs

 

So be careful with Flows and Workflows, it is not very common to use group names in these cases because it is possible to create the logic using the reference, but it is important to check the main Flows to be sure. It is not possible to do this in an automated way.

 

You can also create logic to check the sys_metadata table, here is the code base:

var gr = new GlideRecord('sys_metadata');
gr.addQuery('name', 'CONTAINS', 'assignment_group');
gr.query();
while (gr.next()) {
  gs.print(gr.getValue('name') + ' [' + gr.getValue('sys_class_name') + ']');
}

 


Best regards,

Isaac Vicentini
MVP 2025


If my answer was helpful, mark it as Helpful or Accept as Solution.

Hi @NavinD,

 

If my answer clarified your doubts, please mark it as the solution to help others as well.

 


Best regards,

Isaac Vicentini
MVP 2025


If my answer was helpful, mark it as Helpful or Accept as Solution.