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
FaridKognozFaridKognoz 

Paginate more than 10000 records on salesforce

I'm trying to make a VF page listing records using the StandardSetController.The problem I have is when dealing with more than 10 thousand records (I get an exception from the SetController). Is there a way to paginate records when the total amount of records is more than 10000? When using standard salesforce views for the object I see there are no problems with it so there has to be a way.

Thanks;

 

Farid

SelectedPartnerSelectedPartner

When using StandardSetController to list the records set, there is a maximum record limit of 10,000 

 

is it necessary to paginate so many records? or should we make a more strict criteria to filter them

FaridKognozFaridKognoz

Yes, it's a good point. The thing is, when I load the List for the first time there are no filters on the query, they are applied later. I suppose limiting that query with 10000 records is not that bad.

Thanks.

haripopuri1haripopuri1

I have similar problem. My VF page is breaking for 1000 records itself. I am using ObjectPaginator from apex-lang (found in Google). Currently I restricted results to 500 records. Is there a way to make pagination for atleast 5000 records.

 

Thanks

Hari