5

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:

Contact.Name:

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.

2 Answers 2

2

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

Works:

[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

2
  • If managed package already has WHERE clause with LIKE operator then who will change this? Commented Feb 14, 2018 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
    Commented Feb 15, 2018 at 0:28
3

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

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

Contact

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

Lead

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

Opportunity

  • Opportunity Name
  • Description
  • Next Step

Case

  • Subject
  • Description

Case Comment

  • Body

Contract

  • Billing Address
5
  • no, I dont know the process, but this is valid issue Commented Feb 12, 2018 at 21:56
  • @sfdcfox different package to DLRS Commented Feb 12, 2018 at 21:58
  • @PhilHawthorn Oh, doh.
    – sfdcfox
    Commented Feb 12, 2018 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
    Commented Feb 12, 2018 at 21:59
  • @SantanuBoral Thank you for sharing this. Can also provide official documentation link for this list? Commented Feb 15, 2019 at 17:00

You must log in to answer this question.

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