How to Query/SOQL Field Dependency for an Object in Salesforce?

How to Query/SOQL Field Dependency for an Object in Salesforce?

FieldDefinition can be used to Query/SOQL Field Dependency for an Object in Salesforce.

Sample Field Dependency:

SOQL:

SELECT Label, QualifiedApiName, DataType, ControllingFieldDefinition.DeveloperName
FROM FieldDefinition
WHERE EntityDefinition.QualifiedApiName = 'Employee__c' AND ControllingFieldDefinitionId != null

Output:

Leave a Reply