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
Saikat GangulySaikat Ganguly 

Is there a way to get Accounts associated with a User.

SOQL query to get account Ids that is associated with a User (a salesforce user)?. Or a SOAP api solution for the same.
RAM AnisettiRAM Anisetti
Hi Saikat,

U can get idea through the below image
User-added image

first you need to know Sf userid(get account Ids that is associated with a User)
//example 
String sfid="005hhfd6634hh";

&&&&
replace "soqlQuery" as below

String soqlQuery="select id from account where ownerid in :+sfid ";