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
WinningJrWinningJr 

Easy One - SOQL to get Accounts for AccountTeamMembers

Hi,

 

I need help with the osql to get accounts for an AccountTeamMember (one user) using the REST API.  It would be similar to:

 

"Select Id, Name, BillingStreet, BillingCity, BillingState From Account Where Account.AccountTeamMember.UserId = '"

+ myTokens.get_id() + "'";

 

Thanks,

Gerry

Best Answer chosen by Admin (Salesforce Developers) 
WinningJrWinningJr

String soqlQuery = "Select Id, Name, BillingStreet, BillingCity, BillingState From Account Where Id in (Select AccountId from AccountTeamMember Where UserId = '" + myTokens.get_id() + "')";