0

I have a custom object called Engagement__c that has Account__c. Account__c has a field called Name. The relationship between them is that Account__c is a lookup field in Engagement__c. I want to create a simple formula field in Engagement__c that gets the Name of Account__c.

Account Name (text):

Account__c //Works - no syntax error

Account__c.Name //ERROR - Field Account__c does not exist. Please check spelling

1 Answer 1

0

according to Understanding Relationship Names, Custom Objects, and Custom Fields

When you use a relationship name in a query, you must use the relationship names without the __c. Instead, append an __r (underscore underscore r).

so use Account__r.Name

2
  • For me, this generates the error "Error: Field Name does not exist. Check spelling." Also, when I use "Insert Field", the field Name is not listed, although it very much exists on the lookup object (Lead) and all the other fields are shown as expected. Is there something special about Name?
    – kamezaburo
    Commented Sep 4, 2020 at 15:53
  • @kamezaburo I think, it worth to create another new question Commented Sep 7, 2020 at 7:03

You must log in to answer this question.

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