You need to sign in to do that
Don't have an account?
viswsanath
HI,
How to set the batch size in batch apex class? pls any one help me.
Thanks,
Viswa
How to set the batch size in batch apex class?
HI,
How to set the batch size in batch apex class? pls any one help me.
Thanks,
Viswa
You can use the Database.executeBatch(sObject className, Integer scopeSize) method to set the new batch size.
Be sure the scopeSize should less than 200.
Database.executeBatch(sObject className, 50 ) would set the batch size to 50 instead of 200
when you are running the batch class there you will set the size. Check the example:
ExampleBatchClass b = new ExampleBatchClass();
//Parameters of ExecuteBatch(context,BatchSize)
database.executebatch(b,10);
Please select this as Best Answer if it helps you to solve your problem.
You need to pass like :
Your Batch Controller Name : Batch_TestController
Like you want to size : 200
then use : If this answers your question then hit Like and mark it as solution!