How to check if CIs are referenced in other tables

Greg33
Tera Guru

Hi All,

 

I need to clean up a cmdb table and remove the unrequired CIs from the table. The issue I'm facing is that I need to check that these CIs are not being referenced on some other table.

For example, if there is an incident/change/problem etc. create with a CI, I should not delete it.

Is there a way for me to check if a CI is being referenced in another table in the system?

 

Thanks in advance

1 ACCEPTED SOLUTION

SatyakiBose
Mega Sage

Hello @Greg33 

You can use the script provided in this page to find all records where a field is referenced.

Find all System References to a Specific Record - ServiceNow Guru

 

If my reply has solved your question, please mark it as solution

 

View solution in original post

3 REPLIES 3

SatyakiBose
Mega Sage

Hello @Greg33 

You can use the script provided in this page to find all records where a field is referenced.

Find all System References to a Specific Record - ServiceNow Guru

 

If my reply has solved your question, please mark it as solution

 

Thanks Satyaki, that seems to be what I was looking for!

SatyakiBose
Mega Sage

@Greg33 

If the above does not work, then you can also check the solution provided here:

Get all references by sys_id from all tables - ServiceNow Community