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 :


No comments:

Post a Comment