0

This question already has an answer here:

I can't figure out what's wrong with this field formula. Everything below in quotes has been copy/pasted directly so there are no typos AFAIK.

Custom object API name = CompanySetting__c
Custom object field API name = Title__c
Custom field formula on Lead object:
Location (Text) = CompanySetting__c.Title__c

"Error: Field CompanySetting__c does not exist. Check spelling."

I have also tried unsuccessfully using "CompanySetting__r.Title__c"

On a different object the following field formula works as expected: Account.Location_Title__c

But that might be due to the fact that the object is not a custom object even though the field is a custom field.

Any suggestions?

marked as duplicate by sfdcfox, David Reed, glls, Oleksandr Berehovskyi, Vigneshwaran G Jun 29 '18 at 8:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • See also documentation – David Reed Jun 28 '18 at 22:09
  • What is the API name of the lookup field on the Lead object? CompanySetting__r.Title__c should work if the lookup field's API name is CompanySetting__c. – David Reed Jun 28 '18 at 22:29
  • Sorry, I don't understand "lookup field on the Lead object" - did you mean custom object? Also don't understand "lookup fields API name is CompanySetting__c" when that is the custom object's API name. – RPW Bassman Jun 28 '18 at 22:43
  • You must have a field connecting Lead to CompanySetting__c. What is the API name of that field? If there's no relationship between the two objects, you won't be able to create a cross-object formula. – David Reed Jun 28 '18 at 22:45
1

Custom object API name = CompanySetting__c Custom object field API name = Title__c /**************************************/ Let say the Lookupfield Api Name which references the CompanySetting__c records from Lead Object is CompanySettingLkp__c. Then Custom field formula on Lead object: Location (Text) = CompanySettingLkp__r.Title__c

Salesforce maintains a relationship between Lead and Account so every Lead will be under some Account, they have reference fields defined by salesforce but in your case its custom object where salesforce didn't provide anything, you need to create Lookup field to CompanySetting__c afterwards with the name of the Lookup you can have Cross-Object Data.

  • Thank you. I tried that and got the same "does not exist" error. – RPW Bassman Jun 28 '18 at 22:40
  • What is the name of you lookup file in Lead? – Tapas Tripathi Jun 28 '18 at 22:43
  • I am trying to create a new formula field on the Lead object with the name of "Location". As I cannot get past the formula step, the field does not yet exist. – RPW Bassman Jun 28 '18 at 22:46
  • Before creating the formula field you need to create some reference field first, either Master-Detail/Lookup to CompanySetting__c, does it exists? Afterwards you can create cross-object formula field. – Tapas Tripathi Jun 28 '18 at 22:48
  • Salesforce maintains a relationship between Lead and Account so every Lead will be under some Account, they have reference fields defined by salesforce but in your case its custom object where salesforce didn't provide anything, you need to create Lookup field to COmpanySetting__c afterwards with the name of the Lookup you can have Cross-Object Data. – Tapas Tripathi Jun 28 '18 at 22:52

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