Find Dependencies
Metaforce Find Dependencies is an impact analysis and metadata dependency engine powered by the Salesforce Tooling API (MetadataComponentDependency). It maps the relationships between custom objects, fields, Apex classes, flows, and Lightning components before you make architectural changes, refactor code, or perform destructive deployments.
Core Capabilities
- Bidirectional Dependency Analysis:
- Where is it used? (Downstream References): Discover every piece of code, workflow, layout, and formula that references a given field, object, or class.
- What does it use? (Upstream Dependencies): Discover every field, custom setting, or helper class that your Apex class or Flow depends on.
- Deep Field-Level Impact Tracing: Inspect where a custom field is referenced before deleting or modifying its data type.
- Cross-Metadata Coverage: Analyzes Custom Objects, Fields, Apex Classes, Apex Triggers, Visualforce Pages, Aura Bundles, Lightning Web Components (LWC), Flows, Validation Rules, and Email Templates.
- Interactive Dependency Tree: Explore relationship hierarchies visually with collapsible nodes and direct linkouts.
Running a Dependency Search
1. Choose Dependency Direction
In the left configuration panel, select the analysis direction:
- Where is it used? (References): Ideal for impact analysis. For example, "If I delete
Discount_Rate__c, which Apex classes or Flows will break?" - What does it use? (Dependencies): Ideal for deployment packaging. For example, "Which custom fields and helper classes must I include in my change set for
OrderService.clsto deploy successfully?"
2. Select Metadata Type & Component
- Choose the metadata category (e.g.,
CustomField,ApexClass,Flow,LightningComponentBundle). - If analyzing fields, first select the target Object (e.g.
Account), then select the specific Field. - For Apex or Flow, type to search by component name with auto-complete.
3. Analyze Dependencies
Click Find Metadata Dependencies. Metaforce queries the dependency graph and displays the results in the right panel.
Interpreting Results & Impact Analysis
The results panel organizes discovered dependencies into a structured hierarchy:
- Component Name & Type: Clearly labels whether a reference is an
ApexClass,RecordTriggeredFlow,ValidationRule,CustomField, orLayout. - Reference Context: Shows where the dependency exists (e.g., within an Apex method, SOQL query, or formula expression).
- Safe Refactoring: Verify zero remaining references before initiating a destructive change or retiring legacy fields.
- Package Manifest Creation: Ensure all required sub-dependencies are identified when building a
package.xmlfor migration.
