+ Start a Discussion
jdenningjdenning 

Accessing fields based on Id

Is it possible to access fields of another object based on just an ID?  For instance, through SOQL i get a list of opportunity IDs with owner IDs.  Can I get to User fields like department, division, etc. using just the owner ID without needing another SOQL query?

Best Answer chosen by Admin (Salesforce Developers) 
dnakonidnakoni

Usually you can do [select Id, Owner.Name, Owner.IsActive from Opportunity]

 

Hope that helps.