0

I want to define a formula field to have the value of the Name field of a lookup field. I tried something like this:

Lead__r.Name

where "Lead" is a lookup field pointing to a lead. However, the formula builder complains that "Name is not a field". When I use "Insert Field", and click on the Lead lookup field, it shows me all the expected fields on Leads except Name. Is there something special about Name? What am I missing?

enter image description here

1

Lead's don't have a Name field like most other objects, the only way to get the full name is to manually combine the FisrtName and LastName in your formula:

Lead__r.FirstName & " " & Lead__r.LastName
| improve this answer | |
  • Thank you. In that case, what is the meaning of the "Name" field documented at developer.salesforce.com/docs/…? – kamezaburo Sep 4 at 17:52
  • Salesforce uses that field when displaying leads (in relationship fields or list views etc.), and the Name field is accessible in code, it's just not accessible in formula fields – Instread Sep 4 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.