- February 12, 2018 at 9:58 am #25224Ankit #18
What is the difference between query Locator and Iterable in Salesforce Batch Apex?
What is the difference between query Locator and Iterable in Salesforce Batch Apex?February 12, 2018 at 11:57 am #25226PRANAV #2
It depends on your need , if you want to run batch on records that can be filtered by SOQL then QueryLocator is preferable, but if records that you want to bee processed by batch can not be filtered by SOQL then you will have to use iteratable. But most of the cases it will be achieved by query locator , so query locator is preferable so just try with it if you scope is complex and can not be achieved by SOQL then go with iterable.
Hope this helps you.
Please Register to reply to this topic. /