Find all references to an existing record in ServiceNow
Summary
Sometimes you need to know “which records are pointing to this record that I am about to work with”. For example a core_company record that you want to consolidate or you want to know if any active records are pointing to an aged out group. The servicenowguru.com blog has a good interactive solution but I needed to generate a very large list.
Solution
This background script will find all referencing records to a specified table/sys_id combination and save the results to a CSV in the sys_data_source table.
Sample result of all records referencing the core_company “Microsoft” record.
Leave a comment