0

We need to know if is possible the following.

We want to replace a related list to a Visualforce Page that we create. We want to change it in the page layout. Is it possible?

1

Yes and no. You can add a Visualforce Page to your Page Layout as long as you set the StandardController to the object in question. However, pages included as such will be in a different section of the page, so you don't have quite as much control in that regard. The lowest you can place them is directly above the rest of your standard Related Lists.

Here is a basic example of what the page would look like. The key here is the standardController attribute, which enables you to add the page to your layout or use it in button overrides, custom button implementations, etc.

<apex:page standardController="MyObject__c">
    <apex:relatedList list="Children__c" />
</apex:page>
  • Yes, I do that. But it becomes to have a strange behavior because when I add a visualforce page to the page layout, it creates a link to see the complete visualforce. You know how to solve it? – Estíbaliz Tambo Jul 1 '16 at 9:39
  • It sounds like you are referring to the link included by default as part of the relatedList component? You can build it out using pageBlockTable instead. There are many examples online if you look around a bit. – Adrian Larson Jul 1 '16 at 20:27
  • No. The problem is that the visualforce that I included, lightning include it like a link. In the page layout you add the visualforce page and when you visualize it with lightning, it appear a link in the table (but doesn't appear complete) and when you click in it, you can visualize all the table. – Estíbaliz Tambo Jul 4 '16 at 7:37
0

You can refer a sample implementation in this link: Customize Related Lists using VisualForce and Apex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.