How can I find every record that references a particular record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2017 01:00 PM
We are trying to consolidate our groups (sys_user_group), but often when we deactivate one we find out later that some object in the system was referencing that group.
I'm considering writing a brute force script that will go through the cmdb for every field on every table to see if it is a reference field, and if so if it references the sys_user_table, and if so, if it matches the particular record I care about!
Is there something that already does this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2017 01:54 PM
Maybe something like this would help: Find all System References to a Specific Record - ServiceNow Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2017 11:24 AM
That's basically what I ended up doing, although mine looks a little different.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2020 01:09 AM
Hi,
This really helps but it searches in all the servicenow tables which does slow the instance down. I have consolidated a group of 10 tables, in which I want this search script to run specifically. How would one go about that ?
Thanks