function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nisha Babu 8Nisha Babu 8 

Batch class :


I need a batch class that can run any query with any number of clause in where part.
The query is passed to the batch class from another class.
Suppose for the first execution we decided the query to have two clause in WHERE part.
In the next execution there is some three clause in WHERE part.
The batch class must be able to execute both the query without changing the batch class code.

Val KozhirnovVal Kozhirnov
Hi Nisha,

Your proposal is interesting for me. You may contact me via email ( to discuss details.

Mina Michel GorgyMina Michel Gorgy
Hi Nisha,

Have you checked the Asynchronous Apex? Have a look here:

It won't really matter how many clauses you have in your where statement.