I have a use case where few fields on objects have to be encrypted, but there should be a provision to use these fields in filter criteria while creating records.

But by seeing restrictions on these reference docs https://help.salesforce.com/apex/HTViewHelpDoc?id=fields_about_encrypted_fields.htm

there is no way to use encrypted fields in filter criteria on reports .But seems to be in new release there is some new feature 'Platform Encryption' which can help to Encrypt Sensitive Data while Preserving Platform Functionality . But i was wondering will this provide the feature to use the encrypted fields to be used in report filtering too.

I have went through many docs for getting this, but haven't found much.To test this platform encryption currently it is not available in my client environment, and it was mentioned we need some extra licence for this.

Before proceeding i was just looking does this allow encrypted fields in filters too...

3 Answers 3


Unfortunately no.

Per this doc:

Considerations for Using Platform Encryption With Fields


Encrypted fields can’t be used in:

  • Criteria-based sharing rules
  • Filter criteria for list views, reports, and dashboards
  • Portals: communities, customer, self-service, and partner
  • Similar opportunities searches External lookup relationships

And the doc is discussing both Platform Encryption AND Standard Encrypted fields so "Encrypted Fields" above refers to both.

  • thanks eric... i do think the same, is there any better approach to over come this eric
    – Rajasekhar
    Commented Jul 21, 2015 at 1:50
  • @rajasekhar - Not that I am aware of if you need to keep the encryption.
    – Eric
    Commented Jul 21, 2015 at 2:59

Encryption has to be enabled by SF. Encrypted text fields formerly had a max length of 175 characters. Permission required: View Encrypted Data. Encrypted Fields can be searched, cannot be unique, cannot be external ID, and cannot have a default value. Since they can be searched, I'd expect you could use them as a filter in a search.

They can be included in reports, I but can't say about whether they can be filtered in a report. Most anything that you can include in a report can be filtered, but as I've not tested reporting on encrypted fields, I wouldn't want to say for certain.

  • Thanks @crmprogdev. Provided information is very helpful. I feel there is minor correction max length for encrypted fields is not limited to 175 characters. I could go to its full capacity as 255. Commented Sep 10, 2016 at 13:30
  • @KiranMachhewar I suggest you double check the documentation. I just looked and according to help.salesforce.com/apex/…, the limit is still 175 characters. If you've found a different limit someplace else, please cite the reference.
    – crmprogdev
    Commented Sep 10, 2016 at 19:26
  • Consider this ref: imgur.com/sumCZzi Commented Sep 11, 2016 at 7:33
  • @KiranMachhewar Are you using the Salesforce Shield product? If so, that's not standard encryption. Please provide a link to current documentation.
    – crmprogdev
    Commented Sep 11, 2016 at 14:06

The correct answer is now "Yes, but".

You can use "Platform Encryption" fields in report filters but with the following limitations:

  1. You must select Deterministic encryption type. Probabilistic types or "Classic" encryption cannot be filtered on
  2. You can only filter on exact matches (equals/notEquals)
  3. If you don't sync the data after rotating keys, results may not be accurate

For more details, see Considerations for Using Deterministic Encryption.

You must log in to answer this question.

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