Metadata Impact Analysis
sf_get_metadata_dependenciesFind all Salesforce metadata that references a target component, so you can see what breaks before changing or deleting it.
Instructions
Answers "what breaks if I change this?" for any metadata component. Read-only — it changes nothing.
Returns every component that REFERENCES the target (Apex classes, triggers, flows, validation rules, layouts, report types, formulas), grouped by type. For custom fields it also reports how many records currently hold a value, which is usually the deciding factor in whether a change is safe.
componentType + componentName: e.g. CustomField + 'Account.Revenue__c', or ApexClass + 'AccountService' componentId: alternatively pass the Salesforce Id directly (needed for types outside the supported list) includeUses: also return what the component itself depends on
Run this BEFORE deleting or reshaping anything that holds data. Note the blindSpots list returned with every response: this API cannot see dynamic SOQL, string-built field names, managed-package internals, or external integrations, so an empty result means "nothing found", never "safe to change".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| componentId | No | Salesforce Id of the component, as an alternative to type+name (required for types not in the supported list). | |
| includeUses | No | Also return what this component itself depends on (the reverse direction). | |
| componentName | No | Component API name. For CustomField use 'Object.Field__c', e.g. 'Account.Revenue__c'. | |
| componentType | No | Metadata type: CustomField, CustomObject, ApexClass, ApexTrigger, Flow, ValidationRule, Layout, PermissionSet, LightningComponentBundle, AuraDefinitionBundle, StaticResource, ApexPage, ApexComponent |