6

i'm trying to perform Platform Encryption on contact fields : Phone, Fax, Email

But i'm trying to filter MobilePhone in query

SELECT MobilePhone FROM Contact WHERE MobilePhone != null

getting following error :

encrypted field 'MobilePhone' cannot be filtered in a query call
you can click here for help

  • Did you double check that you did not encrypted MobilePhone? Also do you have person account enabled? – Tushar Sharma Dec 20 '16 at 5:58
  • MobilePhone is encrypted , thats why the error is and it is nothing to do with person account – Santanu Boral Dec 20 '16 at 6:01
  • yes i had checked it many time i had tried: sObjectType.Contact.fields.MobilePhone.isEncrypted() it gives false – Ashwani Kumar Dec 20 '16 at 6:37
1

We cannot use long text area field, encrypted data field, or base64-encoded field in WHERE condition in SOQL or SOSL statement.

Refer WHERE conditionExpression

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.