You need to sign in to do that
Don't have an account?
sandy hello
How to pass query with where clause in start method in batch class?
I have a requirent to pass query with where classs in start method in batch class to test few records. I am hard coding name value and executing it in anyonymous window. But the query is failing how can pass it. Similarly i must able to query based on id value. How can i achieve this
global database.querylocator start(Database.BatchableContext BC){
query = ' select id,name from service where name=:test';
global database.querylocator start(Database.BatchableContext BC){
query = ' select id,name from service where name=:test';
please check below example
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi