You need to sign in to do that
Don't have an account?
Ishan Singh 4
How to use contains in batch class?
Health status is a field whose value can be 'Healthy' or 'healthy'. So i want to use contains in my code so that in either way it should run. I am using it as shown below:
l.Health_Status__c.contains('Healthy')
l is a variable
l.Health_Status__c.contains('Healthy')
l is a variable
On the start function of the batch you could filter there Health_Status__c=='Healthy' or Health_Status__c=='healthy'.
If you dont want to filter in the query you can after that in the Start or in the execute filter by "Healthy".
In that case you can use containsIgnoreCase instead of just contains.
If it helps please like and mark as correct, it may help others.