0

Custom field Cont__c, data type is Rich Text Area,

but in the custom Visualforce Searchpage can't to search and error information:

System.QueryException: field 'Cont__c' can not be filtered in query call.

I want to know Rich Text Area or Long Text Area fidles whether can to search? As I do not want to go to the ideaxchange for that https://success.salesforce.com/ideaView?id=08730000000ksTKAAY

3
  • You've already answered your own question...you can't do it. What are you looking for from us? – Adrian Larson Oct 13 '16 at 15:13
  • If there is any workaround – cloudy-ritz Oct 13 '16 at 15:14
  • @cloudlover - You have already answered that as well – Eric Oct 13 '16 at 18:53
3

We can not use text area or rich text area in where clause of soql query, salesforce doesn't allow it.

But we can use alternate solution

for( object_c ob : [SELECT id, Cont__c name FROM object_c] ) {
    if(ob.Cont__c.contains('string to be filtered')) {

    }
}
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.