function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
List<Account> accList = [select id, name,(select Name,FirstName,LastName from Contacts),(Select id,Name from Opportunities) from Account]; for(Account acc: accList){ System.debug('Account'+acc); for(Opportunity opp : acc.Opportunities){ System.debug('Opportunity'+opp); } for(Contact con : acc.Contacts){ System.debug('Contact'+con); } }
List<Account> a = [Select Name,(Select FirstName,LastName from
Account.Contacts) From Account where Name='Account1'];
You can try this:
Thanks,
Vatsal
you can create wrapper class. and have account,contact and opportunity as members. and then create list of wrapper records