function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Priyanka ITSPriyanka ITS 

HI, How many records can I fetch in iterator

Best Answer chosen by Priyanka ITS
Somya TiwariSomya Tiwari

Hi Priyanka,

Salesforce Governer Limits will actually limit you to 50,000. But you can use Batchable Apex where you can easily bypass the limit without any issue !!

Regards,
Somya Tiwari

All Answers

Shubham_KumarShubham_Kumar
Hi Priyanka
If you are using an iterable then the salesforce governor limits are enforced and the records are limited to 50,000.
Priyanka ITSPriyanka ITS
Got it . Thanks a lot
Harsh Panot 9Harsh Panot 9
Hey Priyanka,
Since salesforce has governer limits so whether you use with iterator or without iterator you can fetch 50,000 records at a time.
If you are using SOQL you will have 50,000.
and if you are using SOSL you will have2,000.


If you find this answer satisfactory please mark it as the best answer

 
Somya TiwariSomya Tiwari

Hi Priyanka,

Salesforce Governer Limits will actually limit you to 50,000. But you can use Batchable Apex where you can easily bypass the limit without any issue !!

Regards,
Somya Tiwari

This was selected as the best answer