1

This is the process I am following to see what components are dependent on CustomField : Account.Foo__c

  1. First get Id of custom field:
sfdx force:data:soql:query --query="SELECT Id,DeveloperName FROM CustomField WHERE DeveloperName = 'Foo' AND TableEnumOrId = 'Account'" --u devsandbox --usetoolingapi

Output:

ID                  DEVELOPERNAME
──────────────────  ─────────────
00N800000011111EAY  Foo
  1. Use the above Id and run query against MetadataDependency table.
sfdx force:data:soql:query --query "SELECT RefMetadataComponentType,RefMetadataComponentName,MetadataComponentName,MetadataComponentType FROM MetadataComponentDependency WHERE RefMetadataComponentId IN ('00N800000011111EAY') " --usetoolingapi --u devsandbox

Output:

REFMETADATACOMPONENTTYPE  REFMETADATACOMPONENTNAME  METADATACOMPONENTNAME                     METADATACOMPONENTTYPE
────────────────────────  ────────────────────────  ────────────────────────────────────────  ─────────────────────
CustomField               Foo                       SomeClass                                 ApexClass

If I want to do the same for standard field Account.Name, How can I do that? CustomField doesn't have entries for standard fields.

2
  • 1
    Not supported by the API at the moment.
    – identigral
    Commented Aug 4, 2020 at 17:49
  • 1
    Ya, I think that is the reason we see "where is this used" button only for custom fields.
    – javanoob
    Commented Aug 4, 2020 at 17:53

0

You must log in to answer this question.

Browse other questions tagged .