function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gautam_KasukhelaGautam_Kasukhela 

Field 'Email' can not be filtered in a query call on Contact Object

I am encountering an error when I run a simple query on the Contact record. Email is again a Standard Field 
SELECT Id FROM Contact WHERE Email = 'asd@gmail.com'
I get the below error:-
"
[object Object]: SELECT Id FROM Contact WHERE Email = 'asd@gmail.com' ^ ERROR at Row:1:Column:30 field 'Email' can not be filtered in a query call
"

User-added image
Why can't I filter using a Standard (non text area field)??
 
Gautam_KasukhelaGautam_Kasukhela
If I run the above query in a DEV org, it works fine. So there is something in my current org that is stopping the query from executing, not sure what that is.
Stanislav Ohorodnyk 7Stanislav Ohorodnyk 7
Hope this will help some.
Look into Encryption Policy>Encrypt Fields.
You can’t filter by encrypted fields.