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
Mohit Kumawat 20Mohit Kumawat 20 

Merge fields with custom relationships

Hi,

I am facing problem in understanding merge fields with custom relationships. Could I get some examples using custom relationship(to access parent from child) along with standard objects to get a better understanding? 

Thanks in advance!!

Best Answer chosen by Mohit Kumawat 20
Shubham NandwanaShubham Nandwana

Hi Mohit,
A merge field is a field you can put in an email template, mail merge template, custom link, or formula to incorporate values from a record. For example, you can place a merge field in an email template so that the greeting includes the recipient’s name rather than a generic “Hello!”.

Here is a brief understanding of merge fields with standard relationships and custom relationships:

In standard relationships, the name of the relationship is the master object. For example, you can reference the account name from a contact validation rule using Account.Name; you can reference the phone number of the account creator from an opportunity product formula field using Opportunity.Account.CreatedBy.Phone. In custom relationships, the name of the relationship is the value specified in Field Name with __r appended to it. For example, you can reference contact email from a custom object validation rule using Contact__r.Email.
See https://help.salesforce.com/articleView?id=fields_merge_fields_cross_object.htm&type=5 for more information regarding merge fields.
Hope it helps.​

Shubham Nandwana.
AppPerfect Corp.
salesforce@appperfect.com
408-252-4100
http://www.appperfect.com/services/salesforce/
Salesforce Development & Operations Experts