function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
trwhitmiretrwhitmire 

Cross Object Formula Field question

Hey folks,

 

New to Salesforce and the community; I'd appreciate help on a cross object formula field problem.

 

I've set up a custom field in my Opportunities area as a name lookup to link the opportunity to a specific contact at the target company.  I'd like that lookup to also pull the mailing address, phone number and email for the contact into the opportunity record.

 

I was able to use simple cross object formula fields to pull the phone and the email by using the format ("custom lookup field name"__r.Phone) and ("custom lookup field name"__r.Email), but I can't see to get it to work for ("custom lookup field name"__r.MailingAddress).

 

I've tried various iterations of the MailingAddress (Mailing Address; Mailing; Address; Mailing_Address) but all deliver syntax errors.

 

Anyone know what I'm doing wrong?

 

Thanks for your help.

Best Answer chosen by Admin (Salesforce Developers) 
SurekaSureka

Hi,

 

Mailing Address is not available as a whole. You need to use "MailingCity", "MailingStreet", "MailingCountry" seperately.

 

Thanks

All Answers

SurekaSureka

Hi,

 

Mailing Address is not available as a whole. You need to use "MailingCity", "MailingStreet", "MailingCountry" seperately.

 

Thanks

This was selected as the best answer
Pradeep_NavatarPradeep_Navatar

And one more thing, you should not use the field names like Mailing Address, Address etc. on your own. Every field has one unique API name and you should use that. You should use "Insert Field" button in the Enter Formula (step 3) to find out the field API name.

 

Hope this helps.