I have a Long Text Area(500) field Description__c
on Account
object.
When i'm trying to search a keyword in this field value, it seems it's behaving as Case sensitive to find that keyword.
For e.g.
Description__c = 'Batch/lot number requested, not available at the time of call. Caller refused follow-up.'
String searchText = 'batch'
String searchtext1 = 'Batch'
When i'm trying to find searchText1
in Description__c
, it's working fine.
But when i'm trying to find searchText
, it's returning false and not working.
I've already tried below ways to fix it.
1. if(Account.Description__c.toLowerCase().contains(searchText.toLowerCase())){}
2. if(Account.Description__c.toLowerCase().containsIgnoreCase(searchText.toLowerCase())){}
3. if(Account.Description__c.containsIgnoreCase(searchText)){}
Please help me to fix this case sensitive behaviour of this long text area custom field.