All docs pages (49)

Where Used

Search an Apex class, trigger or custom field and see what references it and what it references, then click through the dependency chain.

Updated 2026-11-10

Where Used shows the metadata dependencies of one component: what references it, and what it references. You start from an Apex class, an Apex trigger or a custom field, and click any item in the results to explore that item in turn. Open Metadata → Where Used. The page is titled Where Used Explorer.

How to use it

  1. Type at least two characters in the search box (Search an Apex class, trigger, or custom field…) and click Search. For a custom field, type part of its API name without __c. The search matches field developer names, which don't include the suffix.
  2. If the list is long, narrow it with the Filter N results… box. It filters by name or type without asking Salesforce again.
  3. Click a result. The page loads its dependencies.
  4. Click any item under Used by or Uses to explore that item. A breadcrumb above the results keeps your path; click an earlier entry to go back to it.
  5. Click the link icon next to an item to open it in Salesforce Setup. The icon is hidden for types the extension can't link to.
  6. Click New search to start over.

What you see

For the selected component, three numbers sit at the top: Referenced by, References and Component (its metadata type).

Below them are two columns:

  • Used by: components that reference the selected one.
  • Uses: components the selected one references.

In the release after 1.1.13, when Used by or Uses reaches 2,000 records, the page says the list may be incomplete and shows that count as "2000+".

Each column groups items by type: Apex, Flows & Workflow, UI & Layouts, Fields & Objects, Reports & List Views, Validation & Rules, Security and Other. Each item shows its metadata type and name.

If Salesforce has no dependency records for the component, the page says No tracked dependencies and reminds you that Salesforce doesn't record dependencies for every type, so an empty result doesn't always mean the component is safe to delete.

Where Used does not tell you whether a flow or class reads or writes a field. For that, use the Automations link on the field hover tooltip, described in How do I find where a field is used?.

What it reads and writes

Where Used only reads. It sends Tooling API queries through your current Salesforce session:

  • The search queries the ApexClass, ApexTrigger and CustomField Tooling objects by name.
  • Picking a component queries MetadataComponentDependency twice: once for rows where the component is the referenced item (Used by) and once for rows where it is the referencing item (Uses).

It does not change anything in your org.

Limits

  • In version 1.1.13, if Salesforce refuses one of the searches (for example because you can't read Apex), the page says nothing matched instead of showing the error. In the release after 1.1.13 it names the search that failed.
  • Search finds only Apex classes, Apex triggers and custom fields. Other types, such as flows, layouts and validation rules, appear once you reach them through the results.
  • Salesforce returns at most 2,000 dependency records per list, and each search returns at most 2,000 matches. In version 1.1.13 the page doesn't warn you when a list reaches 2,000, so a count of exactly 2,000 may be incomplete. In the release after 1.1.13, when Used by or Uses reaches 2,000 the page says the list may be incomplete and shows the count as "2000+". A search that returns 2,000 matches says to type more of the name. In the release after 1.1.13, the SOQL Builder's Where Used dialog does the same.
  • MetadataComponentDependency doesn't cover every kind of reference. As the page itself says, report-only and managed-package usage may be missing. For reports, use Where is this used? on the field in Setup.
  • Standard fields aren't in the search, because the search uses the CustomField object.