You need to sign in to do that
Don't have an account?
nagalakshmi
How to display the related contacts of an account
Hi,
Actually I am displaying the accounts one page block table on visual force page and i keep the command link for account name. If i click on that command link it will display the related contacts in another page block of same visual force page.
Now My requirement is, i want to display the contacts after the account name if i click on the account name. It is not mandotary to use the pageblock. How can i display the contacts after the account name if i click on the account name. Any one please help me how to solve this.
Thanks,
Lakshmi
Hey it can be done in simple way. You have kept the command link for account name so also use Apex:Param in command link and set the value of that account in one setter.
Use that account ID and query in contacts. Fetch all the contacts in a list and return the list in a getter method. Use that getter method in pageblocktable and display the contacts.
You can render the contacts pageblockTable using rendered attribute. When contacts are present then only it will display or else wont.
Hi,
Thanks for the reply..
My requirement is"
account1
account2
account3
.
.
suppose i click on account 1 it has to display related contact details of that account like this:
account1
contact1
contact2
account2
account3
account4
.
.
.it should be like this.
Can u help me?
please...
Any luck on this? I have the same requirement.