You need to sign in to do that
Don't have an account?
raSFUser
Using Scope Database.executeBatch()
I have a question about using batch and the passing in a Scope, lets say im processing a batch of 53 records, however due to other governance limits i need to use scope to limit 30 records per transaction.
e.g.
Integer scopeSize = 30; jobId = Database.executeBatch(batch, scopeSize);
If I use the something like the above, will one or two entries be created in the Queue ?
Select Count(Id) FROM AsyncApexJob Where Status = 'Holding'
Everything I have read doesn’t seem to detail this bit….
Greetings!
Yes,if you use the scopeSize as 30 and you are trying to process the 50 records then the records will be processed in 2 batches as the ScopeSize will be the number of the records per batch.
However,you can only see one job on the UI with the number of records processed.
Please mark it as best answer if it helps you to fix the issue.
Thank you!
Regards,
Shirisha Pathuri
Yes, if you pass scopeSize of 30, the records will auto processed in two batches as records are greater than scopeSize.
and It is used to Count the flex Queue Size:
If you find this helpful, please mark it as the best answer to help others.