You need to sign in to do that
Don't have an account?
show more than 10000 records in visual force
Hi, Im trying to display more than 10000 records i'm facing an error.
Visualforce Error
Help for this Page
Collection size 10,358 exceeds maximum size of 10,000.
Please find the code and suggest me.
VF Page:
<apex:page controller="Display10000" readOnly="true" >
<apex:pageBlock title="{!size} records retrived">
<apex:pageBlockTable value="{!accList}" var="a">
<apex:column value="{!a.name}" />
<apex:column value="{!a.phone}" />
<apex:column value="{!a.AccountNumber}" />
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Apex:
public class Display10000 {
public List<Account> accList {get; set;}
public Integer size{get;set;}
//constructor
public Display10000(){
accList = [Select Name,AccountNumber,Phone from Account];
size = accList.size();
}
}
please help me in retriving more than 10k records.
Thanks in advance.
I recommend taking a look at this post
Let me know if this helps
Thanks,
Anudeep
with out using pagination is there is any other way to show more than 10k records with in same page.
Thanks,
Rakesh
Please use transient variable
public transient List<Account> accList {get; set;}
public transient Integer size{get;set;}
It will work. If not then you have to use pagination where offset will come into account.
Thank you for suggesting transient, But even this not working. Any other ideas apart from pagination.
Thanks,
Rakesh