You need to sign in to do that
Don't have an account?
field can not be filtered in query call
Here i given the SOQL code for update and that generating the compile error like field 'Chatter_Monitor_Policy_Keyword__c' can not be filtered in query call.
string abc=obj[0].Chatter_Monitor_Policy_Keyword__c;
string s ='%'+ abc + '%';
List<Chatter_Monitor_Policy__c> records = [SELECT Id, Chatter_Monitor_Policy_Keyword__c from Chatter_Monitor_Policy__c where Chatter_Monitor_Policy_Keyword__c Like:s and CreatedById =: UserInfo.getUserId()];
if(records.size()!=null)
{
for(Integer i=0;i<records.size();i++)
{
records[0].Chatter_Monitor_Policy_Keyword__c = s;
update records[0];
}
What field type is that field?
Its a Text area field.
Thought so!
you can't have a long area text field (including rich text area) in a SOQL Where clause
I cant change it to Text fields. what is the other way to solve that??
Hi,
You cannot use TextArea/Long Text field in SOQL and SOSL.
The alternative way is to fetch all the records from the object and then iterate your records to check the filter criteria.
to check the filter criteria you can use the object.textArea_field__c.contains(''check string') method.
Thanks,
Please let me know if this way helped you in getting right solution.