- November 12, 2018 at 12:37 pm #51950Divya #11
What is the difference between Database.QueryLocator and iterable?
what are their main differences.November 12, 2018 at 1:10 pm #51955Prachi #6
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.
Please Register to reply to this topic. /