This is the process I am following to see what components are dependent on CustomField : Account.Foo__c
- 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
- 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.