You need to sign in to do that
Don't have an account?
SFDC Bayya
i am writting a simple query but its giving an error
select id,name, (select id from contact) from account where id =:accountid
i dont understand where i am going wrong can any one guide me
i dont understand where i am going wrong can any one guide me
Create a List<Id> accountid = new List<Id>() ; which contains Account Id based on which you want to filter account.
Please mark it as best solution to your problem if it does solve your problem.
you need to assign assign id for that variable before using that.
eg,
List<Id> accountid = new List<Id>() ;
for(Account a : [select id from Account]
{
accountid.add(a.id);
}
List<Account> accList = [Select id,name, (Select id from Contacts) from Account where id =:accountid];
Mark this as best answer if its helps.
Thanks.
Praveen Murugesan.