2

We have a Pre release org that has platform encryption turned on. We turned on encryption on several managed fields. When we tried updating the package that the managed fields were in, we got the following error:

encrypted field 'myfield__c' cannot be filtered in a query call

We took out encryption from the field and tried reinstalling the package but keep getting the same error. This has broken many pages in our org. Any thoughts on how to fix this?

4
  • 2
    You may need to contact SF. Encrypted fields cannot be used in the WHERE condition of a query. If the managed packaged (looks like it was) was using that field in a filter you essentially killed it. Turning it off may not be enough to stop this behavior once the field was set as an encrypted field via platform encryption. (Surprised you were even able to do it on a managed field). Hopefully someone else proves me incorrect but me thinks it is time to put on your patience hat and open up a css with SF. good luck...
    – Eric
    Commented Sep 27, 2016 at 15:15
  • That sounds right. Have you ever done this? Is it going to take long to revert? We were getting encryption failed emails for other fields that we were querying by. This is the only one that got encrypted and is causing problems although it was being queried at the time we encrypted it.
    – Jorjani
    Commented Sep 27, 2016 at 15:27
  • @DacidJ - No I have never encountered this. It could be a bug. Maybe the package dynamically referenced the field so the protections failed. Who knows. Either way, sounds like SF may have to get involved.
    – Eric
    Commented Sep 27, 2016 at 15:41
  • Have you contacted Salesforce support and did they shed light on this topic?
    – Patlatus
    Commented Feb 1, 2018 at 16:48

2 Answers 2

1

I suspect the answer to this might be revealed in text shown as tooltip when you edit encrypted checkbox on field en1ter image description here which says

Once encryption is enabled, certain features won't work for this field even if encryption is later disabled. See Considerations When Using Platform Encryption.

which should be read as

Once you make field encrypted, you will be not able to perform certain actions like using that field in WHERE clauses of SOQL query EVEN IF encryption is later disabled without contacting Salesforce Support.

Emphasize is mine.

0

I had to contact Salesforce Support to help us resolve this issue. We ended up deleting the dependencies with their help after disabling platform encryption.

You must log in to answer this question.

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