How to query Field Usage for a Salesforce Field?

How to query Field Usage for a Salesforce Field?

Field Usage(BusinessStatus) is stored in FieldDefinition object/entity. We can query the FieldDefinition object/entity to query Field Usage for a Salesforce Field.

Sample SOQL:

SELECT Id, DeveloperName, BusinessStatus
FROM FieldDefinition
WHERE EntityDefinitionId = 'Account'
AND DeveloperName = 'AccountNumber'

Leave a Reply