Skip to main content
Group

Dependency API / Field Usage (Beta)

This is a beta feature group for the Dependency API and "Where is this field used?" feature (GA). The API provides the ability to query for dependencies that exist between components in an org. The "Where is this field used?" feature allows admins to check where a particular field is referenced through Setup UI.

This API is solving some important problems for us and I'd like to ask whether there are any further updates on a possible move to GA? The last update I saw came from @James Ferguson in May this year saying that Salesforce is working on changes to make this API more sustainable.

Thanks!

 

#SalesforceLive

81 answers
0/9000

Hi there, 

 

I'm working with this beta feature and per 

documentation,  I'm using Bulk API 2.0 to retrieve information stored on MetadataComponentDependency, however, when I run it following Bulk API 2.0 guidance

 I get the following error: 

sObject type 'MetadataComponentDependency' is not supported. 

 

I can see I'm not the only one :) I can see just below post 

 

What can I do? Is there any other way to retrieve data? Tooling API has a limitation of 2000 records and due to the high volume my use case has, if I use it, I will hit daily API limit.  Also, as this entry also shows, Tooling has some issues, it does not retrieve Reports and it is suggested to use Bulk API 2.0 but it doesn't work properly. 

 

Any thoughts? 

 

Thanks!!

4 answers
  1. Jan 26, 1:13 PM

    We need to make it work on sandboxes and production orgs. I understand beta limitations but some of them are surprising me. 

    Thanks Sara. We are implementing a workaround with composite and tooling api. 

0/9000

I'm trying to query MetadataComponentDependency via Bulk API 2 per the linked directions using Postman. The reply I receive is below. I'm on the latest SF release and I think this is possible in Production now. The documentation doesn't say it isn't. My ultimate goal is to create a data dictionary with as comprehensive a list of "Where is this field used" information. 

 

https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_metadatacomponentdependency_bulk2_usage.htm

 

 

"errorCode": "INVALID_TYPE", 

        "message": "sObject type 'MetadataComponentDependency' is not supported."

2 answers
  1. Jul 28, 2025, 3:19 PM

    Thank you for sharing this. It really doesn't get to the root of my issue. The field usage info is the only thing that comes close. However, it only shows if a field is used not where.

0/9000

I just tried out the Tooling API to get Dependency:

SELECT MetadataComponentType, MetadataComponentName, MetadataComponentId, MetadataComponentNamespace, RefMetadataComponentName, RefMetadataComponentId, RefMetadataComponentNamespace, RefMetadataComponentType

FROM MetadataComponentDependency

WHERE RefMetadataComponentId = '00NQ80' AND RefMetadataComponentType = 'CustomField'

ORDER By RefMetadataComponentName

The display is similar to Salesforce Where it is used but still for the related flow, I would like to know which version it is? 

Is it possible to get it in a same query?

5 answers
0/9000

Matthew Morris Salesforce CTO & DCX Innovation Director at Capgemini UK, recent article  “Why Advanced Tools Are a Strategic Imperative for Modern Delivery” https://www.linkedin.com/pulse/salesforce-cto-eye-why-advanced-tools-strategic-modern-matthew-morris-3uk0f/?trackingId=kAo1P7UElSuG5wmwNEQGhQ%3D%3D

0/9000

Hi, 

 

I can only get flow components to be returned using the Tooling API and not the Bulk API. 

 

Is there a list of which component types are available for both the tooling and bulk api ? I know reports are only available via Bulk api but I was surprised flow was not available.

1 answer
  1. Feb 18, 2025, 9:52 PM

    I tried to do the comparison myself as I am not aware of such listing to be honest with you.

    And that was about it in terms of differences. At least in the org I am working right now.

    So flows on one side and reports, report types and dashboards on the other side.

    On none of the side you have email template, and workflow rules alerts etc.

    Would be nice to have also information about the usage of role and groups but this is now available in the setup as summary for groups. But one by one.

0/9000

Hello,

I tried to use Tooling API MetadataComponentDependency to query Dependencies on custom fields of some objects in my org using this query:

SELECT MetadataComponentName, MetadataComponentType, RefMetadataComponentName, RefMetadataComponentType FROM MetadataComponentDependency WHERE RefMetadataComponentId = '${fieldId}'

However the query results don't retrieve reports and report types

Report and ReportType dependencies are visible when I click on 'Where is this used?' button in the field's detail page but not in the query results..

 

Am I lacking some permissions or missing anything else?

4 answers
  1. Sushil Kumar (UKG) Forum Ambassador
    Oct 9, 2024, 10:37 AM
0/9000

When running the below query, I am unable to get any results, although the Custom Label is actually used in a flow.  

Is there a known bug or a place where I can read about limitations? 

 

SELECT MetadataComponentId, MetadataComponentName, MetadataComponentType, RefMetadataComponentId, RefMetadataComponentName, RefMetadataComponentType FROM MetadataComponentDependency WHERE RefMetadataComponentId IN ('Custom_Label_ID_here') OR MetadataComponentId IN ('Custom_Label_ID_here')
2 answers
  1. Mar 30, 2025, 7:44 PM
    We did the query with @Sara Sali directly using Salesforce Inspector Reloaded (also a great tool if you don’t have it download it NOW!!!!) and the result of the query to DAPI shows indeed that flows and custom labels dependencies are not included in the DAPI.
0/9000

I have been playing with this, and see LWC are listed, but when they are used in Flows, they don't showup. 

Likewise, when using Bulk v2, Flows returns 0 results every time. 

Is there some clear documentation about what pairs  of types actually work? 

0/9000

Hi everybody,

 

I would like to use the Dependency API to find out which metadata components all have a dependency on a specific public group. Unfortunately, when I execute the corresponding SOQL queries using Tooling API, I always get the information that no records were found. However, I know that dependencies exist and, for example, an email alert has referenced the public group as a recipient.

Am I doing something wrong, or is the Dependency API currently not supporting the retrieval of dependencies on public groups?

 

Example SOQL query that I use:

SELECT MetadataComponentName, MetadataComponentType FROM MetadataComponentDependency WHERE RefMetadataComponentId = '3D00G2p000009G67R'
6 answers
  1. Oct 4, 2024, 10:17 AM
    @Till Affolter

    as of now the dependency api does not cover the public groups. You will need to find another way to gather that dependency. As other suggested you might look into different areas in the codebase that you can download from the metadata api using VSCode for example.

    I do understand that this dependency api should also reference more than you see today. But as I see the situation today it is beta. So including some limitation like this one.

    I have created an Salesforce application called Org Check (but you have others like

    HappySoup.io

    ) that could be used to find the answer of your problem.

    Take care.

    See

    @Org Check by Salesforce Labs
0/9000