You need to sign in to do that
Don't have an account?

Strange compilation error
I wrote this code :
List<Contact> contactsToCount = [Select Id, Account from Contact where Account in : account_id_list];
Tkan i got an compilation error saying that there is not sych a field
Account in sObject contact.
Contact is being given by salesforce ans so the field Account (Label : Account Name).
Can someone tell me what is the p[roblem?
Thanks!
Account is the relationship name between contact and account, and thus you can't select it.
You can get the account id, using the following:
or the account name using the following:
All Answers
Account is the relationship name between contact and account, and thus you can't select it.
You can get the account id, using the following:
or the account name using the following:
Thank you!!! :-) Solved!