You need to sign in to do that
Don't have an account?
Scott0987
No such column 'Contact' on entity 'User'
I am trying to get the account and contact based on the portal user and is running the apex code. I can get the user id using :
user uid = [select id from user where id = :UserInfo.getUserId()];
but when I add contact to that I get an error " No such column 'Contact' on entity 'User'" even though when I open the user object it has a lookup field called contact. Any idea how to get the contact and account?
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_user.htm
You will need to use the fields ContactID or Contact.ID and AccountID or Account.ID
All Answers
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_user.htm
You will need to use the fields ContactID or Contact.ID and AccountID or Account.ID
Thank you for your help.