i want to search a text in Rich Text area field of a custom object.
Since We can't use the RichTextArea field in the where clause of SOQL, I am looking for the way to search a text.
Is there any way to do it??
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityi want to search a text in Rich Text area field of a custom object.
Since We can't use the RichTextArea field in the where clause of SOQL, I am looking for the way to search a text.
Is there any way to do it??
I know this question was asked quite a while ago, but for any of you who are looking for help, I offer this solution.
You can perform filtering as desired in Apex. The quickest and easiest way to execute Apex is in the "Execute Anonymous Window" of the Force.com Developer Console.
Below is an example of searching for 'foo' in a Rich Text custom field (Rich_Text__c) on the Contact.
List<Contact> contactList = [Select Id, Rich_Text__c FROM Contact];
for( Contact theContact : contactList ) {
if(theContact.Rich_Text__c != null && theContact.Rich_Text__c.contains('foo')) {
// Do what you will
}