5

With Winter'20 release we now can specify Compliance Categorization for fields. However, it's not clear if we can access it in apex. DescribeFieldResult Class doesn't provide any specific methods to retrieve this info.

1
  • 2
    You can retrieve this information using SOAP and/or Tooling API using FieldSecurityClassification and FieldDefinition respectively. Details on this help doc. Does this help?
    – Jayant Das
    Jan 2, 2020 at 19:02

1 Answer 1

1

You can use get that data using below SOQL. Please add the fields as you like:

SELECT Id, DeveloperName, Description, BusinessOwnerId, BusinessStatus, SecurityClassification FROM FieldDefinition WHERE EntityDefinitionId in ('Account','Lead')

Documentation: https://help.salesforce.com/s/articleView?id=sf.data_classification_metadata_fields.htm&type=5

You must log in to answer this question.

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