You need to sign in to do that
Don't have an account?
Lu Zhang 10
Why this code is displaying only 20 records instead of all?
The below is my code. Question is why this is displaying 20 account records instead of all?
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock title="Accounts">
<apex:pageBlockTable value="{!accounts}" var="a" rows="1000">
<apex:column headerValue="Name">
<apex:outputLink value="/{!a.Id}"> {!a.name} </apex:outputLink>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
<apex:page standardController="Account" recordSetVar="accounts">
<apex:pageBlock title="Accounts">
<apex:pageBlockTable value="{!accounts}" var="a" rows="1000">
<apex:column headerValue="Name">
<apex:outputLink value="/{!a.Id}"> {!a.name} </apex:outputLink>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Standard Controller by default only shows the first 20 records that match your filter criteria,
Pagination allows to let people access more than those first 20 records, or perhaps more records per page than just 20.
Add this following Code under <apex:form>
Hope this helps!
Best Regards,
Sourav.
By default, a list controller returns 20 records on the page. To control the number of records displayed on each page, use a controller extension to set the pageSize. For information on controller extensions, please refer below link.
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_sosc_pagination.htm
VFPage
-------------- Controller
-------------
Please accept my solution as Best Answer if my answer was helpful. It will make it available for other as the proper solution. If you felt I went above and beyond, you can give me kudos.
Thanks and Regards
Sandhya
The standard controller picks up the most recently used list views. Make sure to first view the list view that has the desired filter on and access the visualforce page.
Thanks.
Sanam.