You need to sign in to do that
Don't have an account?
Jos Vervoorn
Account.Name, ERROR at Row:7: Column:13 Didn't understand relationship 'Account' in field path. If you are attempting to use a custom relationship .... // // please reference your WSDL or the describe call ..
When I try to compile it get the following error:
Account.Name, ERROR at Row:7: Column:13 Didn't understand relationship 'Account' in field patch. If you are attempting to use a custom relationship .... // // please reference your WSDL or the describe call ..
This refers to the following line ....
List<User> lstUser = [SELECT
Id,
ContactId,
Email,
Username,
AccountId,
Account.Name,
Profile.Name,
FROM User
WHERE Id = :UserInfo.getUserId()];
Using Workbench I can simply use the query and it returns results. I also check field level security on the name field in the account but all profiles have access.Class btw this line is in is still in API v35 .. but I don't think that is causing the issue.
Account.Name, ERROR at Row:7: Column:13 Didn't understand relationship 'Account' in field patch. If you are attempting to use a custom relationship .... // // please reference your WSDL or the describe call ..
This refers to the following line ....
List<User> lstUser = [SELECT
Id,
ContactId,
Email,
Username,
AccountId,
Account.Name,
Profile.Name,
FROM User
WHERE Id = :UserInfo.getUserId()];
Using Workbench I can simply use the query and it returns results. I also check field level security on the name field in the account but all profiles have access.Class btw this line is in is still in API v35 .. but I don't think that is causing the issue.
SELECT
Id,
ContactId,
Email,
Username,
contact.AccountId,
contact.Account.Name,
Profile.Name
FROM User
All Answers
List<User> lstUser = [SELECT
Id,
ContactId,
Email,
Username,
AccountId,
Account.Name,
Profile.Name
FROM User
WHERE Id = :UserInfo.getUserId()];
please try this.. mark as answered if your query resolved.
Thanks,
Here is what I would suggest,
Hope this helps and if it resolves the question then please mark it solved!
SELECT
Id,
ContactId,
Email,
Username,
contact.AccountId,
contact.Account.Name,
Profile.Name
FROM User