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
dai tran 6dai tran 6 

How can fillter field is Text (Encrypted)?

Type of field Pass__c is Text (Encrypted):
I create function login:
MyAccount__c  accountToUpdate =  [SELECT UserName__c FROM MyAccount__c   WHERE Status__c=1 and UserName__c=:username and Pass__c=:password   LIMIT 1];
But it show error:
and UserName__c=:username and Pass__c=:password   LIMIT 1
                              ^
ERROR at Row:1:Column:88
field 'Pass__c' can not be filtered in a query call
How can fillter field is Text (Encrypted)?


 
Narender Singh(Nads)Narender Singh(Nads)
Hi,
IN SOQL/SOSL,
Encrypted fields that use the probabilistic encryption scheme can’t be used with the following SOQL and SOSL clauses and functions:
Aggregate functions such as MAX(), MIN(), and COUNT_DISTINCT()
WHERE clause
GROUP BY clause
ORDER BY clause

https://help.salesforce.com/articleView?id=security_pe_considerations_general.htm&type=0