You need to sign in to do that
Don't have an account?
Gourav Jain
Using Standardcontroller Account ,how can i get the contact records?
Using Standardcontroller Account ,how can i get the contact records?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Using Standardcontroller Account ,how can i get the contact records?
Hi,
you can fetch contacts associated with a account using their relationship (master-child).
<apex:page standardController="account" >
<apex:form >
<apex:pageBlock title="Contact details for account" >
<apex:pageBlockTable value="{!account.contacts}" var="con">
<apex:column value="{!con.name}"/>
<apex:column breakBefore="{!con.id}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Make sure you enter account id in the browser.
for ex
https://c.ap1.visual.force.com/apex/contactdetails?id=00190000003OHIS
where 00190000003OHIS is the id of account.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
All Answers
Hi,
you can fetch contacts associated with a account using their relationship (master-child).
<apex:page standardController="account" >
<apex:form >
<apex:pageBlock title="Contact details for account" >
<apex:pageBlockTable value="{!account.contacts}" var="con">
<apex:column value="{!con.name}"/>
<apex:column breakBefore="{!con.id}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
Make sure you enter account id in the browser.
for ex
https://c.ap1.visual.force.com/apex/contactdetails?id=00190000003OHIS
where 00190000003OHIS is the id of account.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.