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
Justin Epistola 1Justin Epistola 1 

Related list Visualforce fields getting removed when I remove the related in page layout

I am using this code; 

<apex:page standardController="Account_Plans__c"> <apex:relatedList list="Key_Contact_and_Objective__r" /> </apex:page>

I am still learning vf and have no background in coding. 

Thanks for your help!
PawanKumarPawanKumar
Yes, this is by design. <apex:relatedList> tags takes fields from layout. If you do not want to get removed from the VF page then custom development required. where you will not use <apex:relatedList>. Please check with your developer. Additionally, you can refer the below URL for custom related list VF and apex code.

http://salesforcesource.blogspot.com/2008/10/how-to-create-custom-related-list-on.html

Please mark best if it helps you. Thanks in advance.

Regards,
Pawan Kumar