Unable to find any method for field encryption and field masking in DescribeFieldResult Class.

Methods like getMaskType, getMask, isEncrypted are working with DescribeFieldResult.

Is there any salesforce documentation which could help me out with more knowledge about these methods.

1 Answer 1


These features are not yet implemented. While the Apex Developer Guide doesn't mention these, you can find them in the SOAP documentation:

encrypted - boolean - This page is about Shield Platform Encryption, not Classic Encryption. ... Indicates whether this field is encrypted. This value only appears in the results of a describeSObjects() call when it is true; otherwise, it is omitted from the results. This field is available in API version 31.0 and later.

mask - string - Reserved for future use.

maskType - string - Reserved for future use.

As you can see, these features are not yet available in the current API (v43.0). It will likely be announced in a future release. You should not depend on these values, because they may not work correctly.

  • 1
    Mask and mask type only apply to classic encryption, it never applied to shield encryption, even less now that we removed the masking capability on the Shield side. Thank you for raising the point on the documentation, it should be working for classic, I will follow up with our documentation team. Jul 10, 2018 at 13:43
  • @AlexandreHersans That's kind of what I suspected. Thanks for confirming!
    – sfdcfox
    Jul 10, 2018 at 15:40

You must log in to answer this question.

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