In my sandbox, Rollup helper managed package has been used.

When try to encrypt Contact Name field by Platform encryption, System is unable to encrypt because in one of the classes is having SOQL query with WHERE clause using Contact Name.

Encryption is now enabled on one or more fields. Encryption enablement has failed for the following fields:


Apex Class: PS_Resource_Manager_Behaviour, line 1831, column 28:

SELECT Count() FROM Contact WHERE LastName = 'Joe'

ERROR at Row:1:Column:35 field 'LastName' can not be filtered in a query call Apex Class: PS_Resource_Manager_Behaviour, line 1832, column 31: SELECT Count() FROM Contact WHERE Name LIKE '%Test Record%' ^ ERROR at Row:1:Column:35 field 'Name' can not be filtered in a query call

The API version of PS_Resource_Manager_Behaviour is 38.

What could be the workaround of this issue. We need to encrypt this field.


The solution to this issue is to use Deterministic Encryption (beta as of Spring 42). You have to call SFDC Support for this to enable it (and you'll need to generate a new tenant secret)

You will not need to contact the package provider

With Deterministic Encryption


[select Id from Account where Name = 'Joe']

But this won't work:

[select Id from Account where Name LIKE 'Joe%']

To resolve the like operator issue, you have to use SOSL

|improve this answer|||||
  • If managed package already has WHERE clause with LIKE operator then who will change this? – Santanu Boral Feb 14 '18 at 21:28
  • @SantanuBoral OP was equality test so answer should work for OP. As for LIKE, the vendor must fix - I agree. Vendor may say: "get lost" and then org is out-of-luck. Frankly, SFDC is leaving orgs with compliance requirements in the lurch for such common fields as Account.Name that participate in hundreds of appexchange packages. We have that issue with Apttus right now – cropredy Feb 15 '18 at 0:28

In my other sandbox the class's version is 41 where it is not giving that issue.

So, need to upgrade the package version.

One recommendation to the package developer is NOT to use following Standard fields in SOQL WHERE clause otherwise, target environment will not able to encrypt fields by Shield Platform Encryption.


  • Account Name
  • Account Mailing Address
  • Physical Address (Only Shipping Street and Shipping City are encrypted.)
  • Phone
  • Fax
  • Website
  • Description
  • Account Site


  • Name
  • Other Address
  • Mailing Address
  • Phone
  • Fax
  • Mobile
  • Home Phone
  • Other Phone
  • Asst. Phone
  • Email
  • Title
  • Assistant
  • Description


  • Name
  • Title
  • Company
  • Address
  • Phone
  • Mobile
  • Fax
  • Email
  • Website
  • Description


  • Opportunity Name
  • Description
  • Next Step


  • Subject
  • Description

Case Comment

  • Body


  • Billing Address
|improve this answer|||||
  • no, I dont know the process, but this is valid issue – Santanu Boral Feb 12 '18 at 21:56
  • @sfdcfox different package to DLRS – Phil Hawthorn Feb 12 '18 at 21:58
  • @PhilHawthorn Oh, doh. – sfdcfox Feb 12 '18 at 21:59
  • So, I was mistaken. Go to the application's listing, and click on the Support tab. They should have contact info there. – sfdcfox Feb 12 '18 at 21:59
  • @SantanuBoral Thank you for sharing this. Can also provide official documentation link for this list? – AtulRajguru9 Feb 15 '19 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.