You need to sign in to do that
Don't have an account?
vishal yadav 86
I want to display related contacts in another page on click of account record.
VF RAMEWORK ==>
<apex:page showheader="false" tabstyle="Opportunity" controller="Acnt_Rltd_CntctClass1">
<apex:sectionHeader title="RECORDS DISPLY" subtitle="ACCOUNTS DISPLAY"/>
<apex:form >
<apex:pageblock title="MAIN BLOCK">
<apex:PageBlockTable value="{!acclist}" var="a">
<apex:column headerValue="ACCOUNT NAME">
<apex:commandlink >
{!a.name}
</apex:commandlink>
</apex:column>
<apex:column headerValue="PHONE">
{!a.phone}
</apex:column>
<apex:column headerValue="RATING">
{!a.rating}
</apex:column>
</apex:PageBlockTable>
</apex:pageblock>
</apex:form>
</apex:page>
VF CONTROLLER==>
public class Acnt_Rltd_CntctClass1
{
public List<Account> acclist{set;get;}
public Acnt_Rltd_CntctClass1()
{
acclist = new List<Account>();
acclist = [select name, phone, rating from account];
}
}
<apex:page showheader="false" tabstyle="Opportunity" controller="Acnt_Rltd_CntctClass1">
<apex:sectionHeader title="RECORDS DISPLY" subtitle="ACCOUNTS DISPLAY"/>
<apex:form >
<apex:pageblock title="MAIN BLOCK">
<apex:PageBlockTable value="{!acclist}" var="a">
<apex:column headerValue="ACCOUNT NAME">
<apex:commandlink >
{!a.name}
</apex:commandlink>
</apex:column>
<apex:column headerValue="PHONE">
{!a.phone}
</apex:column>
<apex:column headerValue="RATING">
{!a.rating}
</apex:column>
</apex:PageBlockTable>
</apex:pageblock>
</apex:form>
</apex:page>
VF CONTROLLER==>
public class Acnt_Rltd_CntctClass1
{
public List<Account> acclist{set;get;}
public Acnt_Rltd_CntctClass1()
{
acclist = new List<Account>();
acclist = [select name, phone, rating from account];
}
}
Greetings to you!
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Controller: AccConC
Visualforce Page 1: AccConPage1
Visualforce Page 2: AccConPage2
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
Controller: AccConC
Visualforce Page 1: AccConPage1
Visualforce Page 2: AccConPage2
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
khan Anas