hope you can help me, how can I display in a table a both the account and contacts fields in VF Page?
Regards
Currently I have this in a method since I call this in button
if(accname != ' ')
{
string srcqry = 'SELECT Name,BillingCountry,(Select Id, FirstName, LastName From Contacts) FROM Account where name like \'%'+accname+'%\'';
acc= Database.query(searchquery);
}
how to display the the contacts together with accountname with billingcountry in VF Page without contacts not using repeating instead 1 account = 1contact per display in row, meaninf if there are many contacts in a single account it will display 1 unique account = 1 associated contacts.
Something like this, apologies, still in the stage of learning
AccountName BillingCountry ContactName
Unique 1 US John Trevor
Unique 1 Spain Paul Blake
Unique 1 India Peter Pan