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

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

1 Answer 1

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

You must log in to answer this question.

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