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
Developer129Developer129 

Showing a list of related objects on detail page with customized link

Hi,

 

I want to add a list of related objects with a customized link with each record on the detail page of a record. How can this be achieved on salesforce.

 

Thanx

Best Answer chosen by Admin (Salesforce Developers) 
CTU007CTU007

All Answers

CTU007CTU007

if you are talking about showing child records in the parent record, like show list of opportunities in the account record detail page, I think you can embed a VF page in the page layout.

 

<apex:pageBlock > 
<apex:pageblockTable value="{!xxx.xxxx__r}" var="pr" >
<apex:column >
<apex:facet name="header">Name</apex:facet>
<apex:outputLink value="/{!pr.id}" target="_blank">{!pr.Name}</apex:outputLink>
</apex:column>

<apex:column value="{!pr.xxx__c}" />
<apex:column >
<apex:facet name="header">part #</apex:facet>
<apex:outputField value="{!pr.Item_Part__c}" rendered="{!pr.RecordType.Name='Standard Item'}"/>
<apex:outputText value="n/a" rendered="{!pr.RecordType.Name='Non Standard Item'}" />
</apex:column>

.....

 

 

Developer129Developer129

Thanks for the quick reply. I dont see an option of embedding VF page on the page layout

CTU007CTU007

 

 

CTU007CTU007

This was selected as the best answer