Trying to identify child or detail records that may exist in relation to another record may seem like a daunting and manual task that requires reviewing each and every object in Salesforce for relationship fields however, this is not so with Schema Builder!
You can graphically view, identify, and document all relationships to and from a specific object to then build queries to identify where related records exist.
This is particularly helpful when you need to identify the cause of poor record deletion performance or occurrences of 'Delete Operation Too Large' messages.
See Work with Schema Builder for more information on getting started.
| Warning Always back up your data before performing any data operation. See Export Backup Data from Salesforce or Export Data for more details. It is recommended to run a test with a small subset of records to ensure the operation was successful through manually opening and verifying that the corresponding records are correct in Salesforce. |
Use the following example as a template to construct queries to return the Ids of the records that are related to the affected record (child side in a lookup field or detail in a master-detail field):
SELECT Id FROM <ObjectAPINameHere> WHERE <RelationshipFieldAPINameHere> = '<AffectedRecordIdHere>'
Replace:
<ObjectAPINameHere> with the related object's API name from step 1. above.
<RelationshipFieldAPINameHere> with the relationship field's API Name from step 2. above.
<AffectedRecordIdHere> with the Id of the record that you're experiencing the issue with when trying to delete.
Use the queries you have constructed and a client tool of your choice such as Data Loader, to perform an export or query as outlined in the Export Data documentation.
If a large number of rows or records (several thousand to 10,000+) are returned from your queries and/or exports, it's likely that this related data may be causing or contributing to your delete or data skew performance issue.
If a large amount of relational data is found, use the resulting export files to then perform a delete operation to mass delete the child records. See Insert, Update, or Delete Data Using Data Loader for more details on deleting data.
After the relational data has been deleted follow the steps in the 'After deleting the affected record's related records' section of the Error 'Delete Operation Too Large' or too slow when you delete records article to empty your organizations recycle bin and request a physical delete to purge relational data.
Visualize Your Data Model Using Schema Builder
000382594

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.