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
Daniel ShaheenDaniel Shaheen 

Relationship SOQL Query stop working with API 35

The following relationship SOQL query was working fine in my Java app at API 34
 
select id, UserType, Contact.Id, Contact.AccountId, Contact.Name, Contact.Email, Account.Type, Account.Name from user where FederationIdentifier='1234'
Now is giving me an exception and compalining about This : -
No such column 'Type' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c'

The running user and profile is fine and have access to the field.
Also I ran the query as the user from Dev console and Wrokbench and is running fine.
Any ideas?
 
R Z KhanR Z Khan
Account is not a standard field on a user object. did you create a custom lookup? Or are you trying ot access a type from the acount that is related to the contact field on a user record?
Shikha AgashiShikha Agashi
 
AccountId is correct. Are you using PersonAccount in your org? if so, then Type is not available in person Accounts.
Daniel ShaheenDaniel Shaheen
I am not sure if you guys missing the point that the query is working fine in Developer Console are returning results and was working before at same application.

@R Z Khan - This is a relationship query, so Account is a reference to account object not a filed.
@Shikha Agashi - The query is 100% correct and working, just not working anymore when running it using the Java app & SOAP API.