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
-_--_- 

apex:related list tag not respecting custom buttons

Hi All,

 

I have overidden the Contact page layout with a custom VF page.  I have added my related list via the <apex:relatedList /> tag however, the related list shown is the default related and I have no way of showing any custom buttons I created.

 

On the related object I have created 2 custom buttons and I wanted to show these custom buttons and NOT the standard 'New' button however I see no way in which I can pull in the custom buttons without re-creating the related list by hand and essentially hacking the SFDC styles in there.

 

Has anyone ever had to do this or am I over-looking a simpler solution.

 

Any help is appreciated.

 

Regards,

 

Omear

Best Answer chosen by Admin (Salesforce Developers) 
-_--_-

Found out that the <apex:RelatedList /> tag actually does follow a recordtypes associated Page layout so that however you have the buttons and fields configured on a particular page layout, even in a VF page they will respect the records record type and page layout settings (I'm assumimg this only works when you have a standard controller).

 

My issue was related to another developer changing the page layouts and therefore causing me to not see the functionality I expected.

 

as for the response, you must have not understood my question as I know how to add buttons to a related list, but I appreciate the response nonetheless.

 

Regards,

 

Omear

All Answers

Subramani_SFDCSubramani_SFDC

I accepted the following solution.

 

 

Found out that the <apex:RelatedList /> tag actually does follow a recordtypes associated Page layout so that however you have the buttons and fields configured on a particular page layout, even in a VF page they will respect the records record type and page layout settings (I'm assumimg this only works when you have a standard controller).

 

 
-_--_-

Found out that the <apex:RelatedList /> tag actually does follow a recordtypes associated Page layout so that however you have the buttons and fields configured on a particular page layout, even in a VF page they will respect the records record type and page layout settings (I'm assumimg this only works when you have a standard controller).

 

My issue was related to another developer changing the page layouts and therefore causing me to not see the functionality I expected.

 

as for the response, you must have not understood my question as I know how to add buttons to a related list, but I appreciate the response nonetheless.

 

Regards,

 

Omear

This was selected as the best answer