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

VF Page in place of a related list in page layout

I wanted to replace the Opportunity Related List in my Account Page Layout because I only wanted to show specific opportunity record types.  I was able to create the page and display correctly, however,there are a couple more things I want to do.


1. I want to add the shortcut link at the top of the account page

2. I want to add the "show more" link at the bottom of my visualforce page.

3. I want to add a custom button on my visualforce page - similar to the New button at the top of related lists in the page.


Anyone have any samples how?


Thank you very much!!!

1) There is no standard way to do this at this time. I'd suggest posting a feature request on the IdeaExchange.

2) You can do this in your controller. A command-link can be added to the bottom of the page, and that would call a function that would increase the number of records shown.

3) You can include a button using the apex:pageBlockButtons element. If you want it to appear only at the top, use the location attribute with the value of "top".

Hi sfdcfox,


Can you give me a sample of the commandlink code to show either the show more or go to list?


I am new in Visualforce and need all the help I can get.


Thank you!



<apex:commandLink action="{!showmore}" reRender="form">Show more</apex:commandLink>


public void showMore() {


Nazeer AhamedNazeer Ahamed

Just a addl tip, instead of calling a command link, if you please the VF page at the end of Detail page - you can get somehow similar look of related list !!!


Hi sfdcfox,


Can you also let me know what to use if I want to show the Go to List link?



You'll have to build a whole page for that. It's kind of outside the scope of a forum post, but basically just create a page that queries all rows for the parent, then create a commandlink that links to that page.
Linda 98Linda 98
Hey..I m trying for same req.Any help pls...urgent

Thanks in advance