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
santhoshreddy vanchasanthoshreddy vancha 

if u want display more then 10000 records by usin page block table it is possible or not ?

Waqar Hussain SFWaqar Hussain SF
Yes you can use readonly attribute to display more than 10000 records on VF page.
 
@ReadOnly 
public static SObject[] getRecords() {
SObject[] results = new SObject[];
SObject[] results =  [SELECT ... FROM SObject WHERE ... ];
return results;
}

 
Shruti SShruti S
It is not possible to show 10000 records on the same page at once. You will hit the view state limits [https://help.salesforce.com/articleView?id=000002955&r=https%3A%2F%2Fwww.google.co.in%2F&type=1]. If you really want to show 10000 records, then you have to paginate and show them.

In order to achieve pagination, you can use 2 techiniques -