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
Rakesh ERakesh E 

can we use query() and querymore() methods in Apex

Hi,

 

i have a pagination requirement for huge records, using standardSetController and OFFSET feature its not possible to handle more than 10000 records.

 

so i am just thinking of whether we can use the query() and querymore() methods to achieve that.

 

please tell me whatever possiblity to handle pagination for huge set (say 2 lakhs) of records

 

thanks in advance

 

Regards,

Rakesh

kriskkrisk

You can take advantage of a feature available in Visualforce that lets you iterate over large data sets - @ReadOnly annotation for Visualforce controller classes will let you retrieve upto 1 million records and setting readonly attribute to true at page level using <apex:page controller="MyController' readOnly="true"> will let you increase limits on the record display from 1000 to 10000 using pageblocktable and repeat mark up tags

 

http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#StartTopic=Content/pages_controller_readonly_context.htm

 

query() and querymore() are methods that salesforce uses internally