I'm fairly new to salesforce so please bare with me as my understanding of the API' and SOQL is very limited.
I'm having troubles linking user object and profile object through 1 query(), the correct information is returned if I run in developer console which also works when I try it in the linked server
basically profile.name is is not defined / empty when I run the query through query()
Developer Console: returns the correct profile name
select user.id, user.Email,user.FirstName,user.LastName,user.profile.name,user.Username,user.IsActive FROM user , user.profile
I have to run two queries in order to link the two together when I use salesForce.query("") method through the api.
any ideas what I can check into next?
Thank you for your assistance.
Best Answer
I ran your query via the Partner API.
One small aside note about the query, you don't need the ", user.profile" in the from clause. SOQL will do the reference join for you without it.
The first sObject that came back in the query result had the following XmlElements in the
Any
property array:So to get to the Profile name element you will need to traverse via the Profile XmlElement. How you do that will depend on your language.