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
PrashPrash 

Is there a work-around to display >1000 rows in pageBlockTable?

Hitting the Governor's limit of "Collection size 1,065 exceeds maximum size of 1,000."

 

I can limit the resultset to 1000 but that means we'll miss some records. I probably can retrieve the records in loop of 1000 each and store them in separate list. But how would I combine/merge them together to display in a pageBlockTable?

 

Thank you,

Pr@sh



Best Answer chosen by Admin (Salesforce Developers) 
Ankit AroraAnkit Arora

You can use list of list and pagination to display records in pageBlockTable.

 

Here is the code to apply pagination with native salesforce look and feel.

 

http://forceguru.blogspot.com/2011/04/pagination-in-salesforce.html

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

All Answers

WizradWizrad

pageBlockTable will not display more than 1000 records.

 

You could paginate your results, and when the user arrows to the next page, query for more.

Ankit AroraAnkit Arora

You can use list of list and pagination to display records in pageBlockTable.

 

Here is the code to apply pagination with native salesforce look and feel.

 

http://forceguru.blogspot.com/2011/04/pagination-in-salesforce.html

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

This was selected as the best answer
srikeerthisrikeerthi

Hi

 

You can display more than 1000 records in VF page using StandardsetController.For once

on VF page you can display 2000 recods.Please refer the following link,http://www.salesforce.com/us/developer/docs/pages/Content/apex_pages_standardsetcontroller.htm

 

setpagesize(2000);is the maximum number of records that can be retrieved using standardsetcontroller.

 

 

Thanks.

 

VSK98VSK98
Hi,

I have been facing ths issue......i had used custom controlller , pageblocktable displaying record
and do actions like update the records.......So, here i cant use řeadonly = true to display morethan 1000 records.......
Mysoql query is list = select id,fax,email from.customobject limit 1000;

sumtimes i got viewstate error also........even i used transiesnt keyord also

anybody suggest to me

adv thnx
siv