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
joaaquinn81joaaquinn81 

Pagination with more than 10000 records

I have been searching for a solution to this without success. I can't find a way to implement pagination with more than 10000 records. I've been using StandardSetController but this don't works with more than 10000 records. I've been looking into the batchable interface but not quite sure how to implement this.


Just to be sure, is there a way that I can process more than 10000 records in a StandardSetController ?


Is there other way I can implement a pagination in where my custom object have more than 10000 records. (probably more than 50000 actually)Thanks.Joaquin

 

bob_buzzardbob_buzzard

You could use a SOQL for loop to pull back more than 10k records and store these in multiple collections etc, but you'd likely hit governor limits I'd imagine.  You could also use a SOQL for loop to extract the page worth of records, but that wouldn't be a particularly efficient solution.


If you need more than 50k records, you'll need to look at batch apex, but that runs asynchronously out of your control, so you couldn't use that to page through records and display to the user.

 

50k + is a lot of records for the user to page through though - is there no other way to present the data?

SathyaincampusSathyaincampus

Bob,

 

   Am facing exactly the same problem now... Can you suggest some options?

Am using JQGrid to show the data to the users and I was using Offset but it didnt work out as we cant give more than 2000 as offset value.. What is your suggestion for paging the data with these many records (74000) ??

 

Also am facing another problem.. Need to allow the user to export the data to excel.. my total recordset size is of around 74000 records.. Any ideas how I can implement that?

 

Regards

Sathya