Showing posts with label When do we use Iterable in Batch Apex?. Show all posts
Showing posts with label When do we use Iterable in Batch Apex?. Show all posts

Tuesday, 12 December 2017

Batch Apex - Iterable

Syntax : global (Database.QueryLocator | Iterable) start(Database.BatchableContext bc) {}
When do we use Iterable ?
When some thing is not achieved by direct SOQL .
1. Aggregate queries in Batch Apex
2. Querying on multiple object
3. To process CSV / XML files
Refer SF Knowledge Article:
Sample Code :