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
raju123raju123 

Relation Ship Queries in Salesforce

Hi,

 

   Can any body give me one Example on Nested Queries. I am getting error while writing Nested Queries.See Following query i am getting error while typing.

 

public class nestedqueryexample
{
public List<Account> getaccsandtmember()
{
List<Account> accounts = [Select Id,(Select TeamMemberRole, User.Name From Account.AccountTeamMembers), Name, BillingCountry from Account];
return accounts;
}
}

 

R_AroraR_Arora

Hi,

 

Enable your Account Team Setup.

 

Go to Set up -> Click on Customize -> Click on Account -> Click on Account Team -> Click on Enable -> Select the Page layout.

-> Click on save.

 

After this Run your query.

 

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.