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
SuvraSuvra 

Retrieving sets of data by SOQL

Hi,

 

Is there any way to retrieve data in sets by using SOQL? Just fro avoiding governor limit, I need to retrieve a certain no. of records from data base in one go. In my page, i'll have one "Next Set" button, on click of which next set of data should come up.

 

Can anyone plz help me on this..

 

Thanks,

Suvra

werewolfwerewolf
SOQL has a batch size parameter where you can retrieve as many as 2000 rows at once.  You can then use the queryMore verb to retrieve the next batch of data.
SuvraSuvra

Hi..

 

Thanks a lot for your reply..

I'll try to implement this in Apex code.

 

 

Best regards,

Suvra