Skip to main content

Where is a field used? Field dependencies in the Insights tab

See every Salesforce metadata component that uses a field - Apex, Flows, reports, layouts - before you change or delete it.

Before you change or delete a Salesforce field, you need to know what depends on it. The Insights tab shows every piece of metadata that uses a selected field, so you can see the impact of a change before you make it.

This article covers where a field is used. To see how much a field is actually filled in on your records, see Field utilization.

Prerequisites

How to see where a field is used

Select any field on a standard or custom object in the metadata dictionary, then open the Insights tab in the right panel. Elements lists the metadata components that use that field.

Each component links to its Salesforce setup page or to its place in the metadata dictionary. Hover over a component to see a pop-up describing how it uses the field.

For a visual view of the same relationships, open the metadata dependency tree or grid from the top of the section.

Which metadata types are checked

Elements checks whether a field is used by the following metadata types:

  • Apex Classes

  • Approval Processes

  • Dashboards

  • Email Templates

  • Fields

  • Field Sets

  • Flows

  • Global Actions

  • List Views

  • Lightning Pages

  • Page Layouts

  • Process Builder Workflows

  • Prompt Templates

  • Reports

  • Records (CPQ Legacy)

  • Assignment Rules

  • Sharing Rules

  • Validation Rules

  • Workflow Field Updates

  • Workflow Rules

Limitations

Apex structures that are not traced

Field usage inside Apex is traced from the code, and a few Apex structures are not yet supported. A field used only in one of these will not appear in the Insights list:

  • SOSL

  • Nested SOQL

  • Chain of lookups in SOQL

  • Dependency usage from other classes

  • SObjects and methods from SObjects

  • Reinitialization of variables to a different type

  • When a Developer org has a namespace but uses a field/object without a namespace

  • Switch-case statement (for apex classes with version 43.0 and more)

Person Account fields

Because of its unusual data model, Elements syncs all Person Account metadata under the Account object, with the prefix Person: followed by the dependent metadata name.

Dependencies on Person Account fields are only reported once the dependent component has been modified. For a report, list view or other component that uses a Person Account field to appear in the Insights tab, its last modified date in Salesforce needs to change. Any edit to that component is enough.

Frequently Asked Questions

Can I safely delete a field that has no dependencies listed?

A field with no dependencies listed in the Insights tab is not used by any of the metadata types Elements checks, but that is not proof it is unused. Check the Apex limitations above, and check how much the field is populated in Field utilization - a field nothing references can still hold data your users rely on.

Why is a dependency I know about missing?

A dependency can be missing from the Insights tab for three reasons: it was added after your last completed Salesforce sync, it sits in one of the unsupported Apex structures listed above, or it is on a Person Account field whose dependent component has not been modified.

Did this answer your question?