0

I'm trying to pull the Contact field by Account name and I'm sure the way I'm doing must not be the right way.

my SOQL:

Select AccountId,Id,FirstName,LastName,Email,Phone 
from Contact where Account__r.Name='BMW'

ERROR at Row:1:Column:71 Didn't understand relationship 'Account__r' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.

1 Answer 1

4

Account is not a custom object, therefore your relationship name should be just 'Account'

Select AccountId,Id,FirstName,LastName,Email,Phone 
from Contact where Account.Name='BMW'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .