You need to sign in to do that
Don't have an account?
Sandeep Patwardhan
Nested pageblocksection
Hi,
I am trying to acheive the following
I have a SOQL query - select Team Name, Team Lead and employees from Company
now team name and team lead are bound together. So I want to create a table in visualforce where team Name and Lead will show in header(pageblocksection) and respetive employee details will show in below table.
Team Name - Test - Lead - John Doe (table will show details of employees from that team)
Team Name - Test_1 - Lead - Tom Doe (table will show details of employees from that team) etc
Please find the below example matching your requirement criteria.
Scenario:
I will have to display a list of Accounts. Under each account i will have to display the associated Account Team Members.
SOQL Query:
The SOQL Query to retrieve both the Account Details as well as the Account Team Member details will be as follows..
This is what is called a nested query which is quite obvious from the fact that you can see two "Select" statements in a single query.
Now, let us create a simple visual force page to display the query results.
Visualforce Page:
Controller (Apex Class):
Your final output will look like this.
Please mark my solution as best answer if it helps yo.
Best Regards,
Nagendra.P