+ Start a Discussion
Sachin Chaudhary 15Sachin Chaudhary 15 

Related List "pageSize"

Hi,

This is my VF page code. But related list showing all contacts though I am using pageSize="1".

<apex:page standardController="Account">
       <apex:pageBlock>
       <apex:pageBlockSection>
       <apex:detail relatedList="false"/>
            <apex:relatedList list="Contacts" pageSize="1"/>
        </apex:pageBlockSection>
        </apex:pageBlock>
 </apex:page>
Sandy GaliSandy Gali
Yes, It doesnot work . The documentation says it will display 5 records if pagesize is not mentioned and that is not working either.
It is displaying all the contact records
Suraj Tripathi 47Suraj Tripathi 47
Hi Sachin Chaudhary 15,
 
<apex:page standardController="Account">
       <apex:pageBlock>
       <apex:pageBlockSection>
       <apex:detail relatedList="false"/>
            <apex:relatedList list="Contacts" pageSize="1"/>
        </apex:pageBlockSection>
        </apex:pageBlock>
 </apex:page
I just used the code in a test environment without changing anything and it worked perfectly. It seems like this could be a Salesforce bug. You should submit a ticket with Salesforce Support and see if they can provide an explanation

Please mark it as the best answer if it helps you to fix the issue.
Thanks And Regards,
Suraj Tripathi.