+ Start a Discussion
Nisha Babu 8Nisha Babu 8 

Batch class :

Hi,

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.

Regards,
  Nisha 
Val KozhirnovVal Kozhirnov
Hi Nisha,

Your proposal is interesting for me. You may contact me via email (valery.kozhirnov@jet-bi.com) to discuss details.

regards,
Valery
Mina Michel GorgyMina Michel Gorgy
Hi Nisha,

Have you checked the Asynchronous Apex? Have a look here: https://developer.salesforce.com/trailhead/apex_basics_dotnet/async_apex

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