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
bhanu challengebhanu challenge 

would u plz tel how to write code in vf

We have 3 objects Account, Contact, Opportunity.   In a VF page, we need to display the names of contact & Opportunity which are related to Account.
Best Answer chosen by bhanu challenge
Amit Chaudhary 8Amit Chaudhary 8
Please try below code
<apex:page standardController="Account" recordSetVar="accounts" tabstyle="account" sidebar="false">
    <apex:pageBlock >
          <apex:repeat value="{!accounts}" var="a">
<apex:pageBlockSection title="{!}"></apex:pageBlockSection>
  <apex:relatedList list="Contacts" subject="{!a.Id}"/>
<apex:relatedList list="Opportunities" subject="{!a.Id}" />
Let us know if this will help you