You need to sign in to do that
Don't have an account?

Is it possible to collapse related list on an object or limiting it to 1 or 2 records per related list ?
Is it possible to collapse related list on an object or limiting it to 1 or 2 records per related list ?
The reason you are not able to see your VF page in drop down list of 'View' is because you are using list controller i.e. ApexPages.StandardSetController.
You will be able to see your VF page in the drop down list of 'List'.
If you want to Override 'View' with a page then you will have to use ApexPages.StandardController in the constructor of your extenstion controller.
Also, you will have to remove recordsetVar="accList".
All Answers
No, it is not possible.
You can vote for the idea here : https://success.salesforce.com/ideaView?id=08730000000BrKS
As a workaround what you can do is create a VF page containing your related list and put that VF page in page layout in a section.
Always show more (or fewer) records per Related List in Salesforce Classic
Here's how to update your User preferences to increase or decrease the default number of records returned for a specific Related List in Salesforce Classic.
1. Select a Tab or Object
2. View a record for the object
3. Scroll to the bottom of the screen to find Always show me more/fewer records per related list
4. Click More to increase the default number of records per Related List or click Fewer to reduce the default number.
Note: The "more/fewer" link is different from the "show more" link that appears for Related Lists on the Record Detail page. "Show more" returns additional records as a one-time action and does not increase the default setting.
For More Details Refer to below link
https://help.salesforce.com/articleView?id=customizing_related_lists.htm&type=5
Thanks
Ajay Dubedi
<apex:page standardController="account" recordsetVar="accList">
<apex:pageBlock title="Detailed View">
<apex:pageBlockSection title="{!Account.Name}" columns="1">
<apex:detail relatedList="false"/>
</apex:pageBlockSection>
<apex:pageBlocksection title="Opportunities of Account">
<apex:relatedList list="Opportunities"/>
</apex:pageBlocksection>
</apex:pageBlock>
</apex:page>
now I want that whenever I click on account record it should open using this vf page.
i try to edit the view
setup>customize>account>link nutton action>view
but there i can't see my vf page
I have written an apex class using page reference
I am not sure where I am going wrong
Apex class:
public class getRecordId{
public String currentRecordId {get;set;}
public getRecordId(ApexPages.StandardSetController controller) {
currentRecordId = ApexPages.CurrentPage().getparameters().get('id');
}
}
VF page:
<apex:page standardController="account" recordsetVar="accList" extensions="getRecordId">
<apex:pageBlock title="Detailed View">
<apex:pageBlockSection title="{!account.Name}" columns="1">
<apex:detail relatedList="false"/>
</apex:pageBlockSection>
<apex:pageBlocksection title="Opportunities of Account">
<apex:relatedList list="Opportunities"/>
</apex:pageBlocksection>
</apex:pageBlock>
</apex:page>
The reason you are not able to see your VF page in drop down list of 'View' is because you are using list controller i.e. ApexPages.StandardSetController.
You will be able to see your VF page in the drop down list of 'List'.
If you want to Override 'View' with a page then you will have to use ApexPages.StandardController in the constructor of your extenstion controller.
Also, you will have to remove recordsetVar="accList".
<apex:page standardController="Account" >
<apex:pageBlock title="Detailed View">
<apex:pageBlockSection title="{!account.Name}" columns="1">
<apex:detail relatedList="false"/>
</apex:pageBlockSection>
<apex:pageBlocksection title="Opportunities of Account">
<apex:relatedList list="Opportunities"/>
</apex:pageBlocksection>
</apex:pageBlock>
</apex:page>