Is there an easy way to see where groups are referenced in workflows, notifications etc?

lharrison
Giga Contributor

Following a re-org we need to change some groups.   Is there an easy way to see where groups are referenced within the system or would I need to do this manually?

Any help greatly appreciated.

Thanks

Larissa

3 REPLIES 3

Ivano B
ServiceNow Employee
ServiceNow Employee

Hi Larissa



This is not an easy task due to the fact the groups are referenced on different levels.



For instance on the notification table.


You can have a groups referenced on


  • the condition
  • the recipients
  • the email scripts

Plus in case the groups IDs is used as a parameter you need to check also on where the email event is triggered.



For the Workflow is even more complex due to the number of tables linked with the main 'wf_workflow_version' table.



You can try to understand properly the structure of the different tables and try to create some scripts used to analyse where a group can be referenced.


The script can be used as background script to recover exactly the right record and execute updates.


To be honest with you this seems quite overkilling.



Probably in this case is better to go manually and maybe try to change the approach used on the different places.


For instance try to use global parameters (e.g. new system variables) in case a designated unique group is used recurrently.



System Properties Best Practices - ServiceNow Wiki



OR try to use (in WFs) scratchpad variables to populate via script the groups



Using the Workflow Scratchpad - ServiceNow Wiki



I hope this will help


Cheers



Robo


HV1
Mega Guru

Hi Larissa,



As Robo correctly mentioned that there can be multiple areas where a group might have be used (either as reference OR hardcoded sys_id). So there is not a easy way to find it all. However you can partially find some references using the "Find Record References" related link in the group record.



- Hardik


Michael Fry1
Kilo Patron

You can use the Find Reference UI action found here: Find all System References to a Specific Record - ServiceNow Guru