2

I want to find the references of a custom field i.e. where is the field used e.g. Layouts, Apex Classes, etc. via the AP/Tooling API.

There is an option on UI in professional salesforce orgs called Where is this used enter image description here

I want to access the same data but via the APIs

Is there any way to do this?

2 Answers 2

3

You can get dependency on any custom object using MetadataComponentDependency tooling API. But, this is still in beta version (MetadataComponentDependency).

v49.0/tooling/query?q=SELECT+Id,+MetadataComponentId,+MetadataComponentNamespace,+MetadataComponentName,+MetadataComponentType,+RefMetadataComponentId,+RefMetadataComponentNamespace,+RefMetadataComponentName,+RefMetadataComponentType+FROM+MetadataComponentDependency

enter image description here

enter image description here

Thanks,

0

Another way to do this programmatically is to use the NPM package sfdc-soup (https://github.com/pgonzaleznetwork/sfdc-soup) which enhances the capabilities (and fixes many of the bugs) of the dependency API

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .