2

I have shield encryption enabled on the contact object and on the email field of the contact object.

In custom apex code (a inbound email handler specifically), I am trying to run a SOQL query to see the contact exists, if not, create it.

I am unable to run the following query select id from contact where email =: email.fromAddress as I receive the following error:

select id from contact where email =: email.fromAddress
                             ^
ERROR at Row:1:Column:30
field 'email' can not be filtered in a query call

I enabled deterministic encryption, but I still receive the error.

Are they any additional steps I need to take to be able to run SOQL on the contact email field?

Related Docs: https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/securityImplGuide/security_pe_deterministic.htm

1 Answer 1

1

You must also generate a new tenant secret under the choose tenant secret type (Data in Salesforce (Deterministic).

enter image description here

At that point, you can then go back to the encryption policy, click encrypt fields, and change the encryption scheme for that specific field to deterministic.

You must log in to answer this question.

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