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
nishad basha 7nishad basha 7 

how to retrieve the Table format Account of contacts using visualforce page?

 i want to display the number Accounts&contacts in table format.how to solve the above scenario please give some ideas.
Keyur  ModiKeyur Modi
Hi,

You can use below code for your requirment
VF page code 




  
  
  
Account Name:
{!eachAccount.Name}
Controller public with sharing class TestAccCOntactContr { public List lstAccount{get;set;} public TestAccCOntactContr (){ lstAccount= new List(); lstAccount=[SELECT id,Name,(SELECT id,FirstName,LastName,Phone FROM contacts) FROM Account LIMIT 50]; } }

If this will help you then please let me know.

Thanks,
Keyur Modi