Loading

Use fields from related objects in a Mail Merge

Fecha de publicación: Sep 24, 2026
Descripción

The ability to use fields from related objects within a mail merge template is available although it does have some restrictions. Currently the mail merge functionality will allow use of fields from a related object, but only if this record has a relationship through a lookup field with the object being merged. If this record is displayed through a related list then the fields on the primary object will populate correctly but those of the related object will not.

Solución

This article explains why fields from related objects sometimes populate successfully in a mail merge, and why they don't in other scenarios, based on the type of relationship between the objects involved.

Why This Happens

Related lists associate the record with multiple associated records. Because of this "many" association (regardless of the actual associated record count), the mail merge is unable to specify which record to pull values from, and will not populate any fields for the related object.

When working with a custom object, there needs to be a Master-Detail (Parent-Child) relationship between the objects. If this relationship is set as a lookup instead, the values from the secondary object will not be included in the merged document.

Example: Merging from a Contact vs. an Account

When running a merge from a Contact record, you can include fields from the related Account record. The relationship from the Contact to the Account allows only one Account, so the merge completes successfully.

Attempting the same merge from an Account record results in a multiple-record relationship, since there can be several Contacts on a single Account. This causes the merge to populate the Account data, but none of the Contact information will display.

Exception: Opportunity Mail Merge

There is one exception to this behavior. When using Contact details within an Opportunity mail merge, a specific Contact can be selected to merge the details from.

Número del artículo de conocimiento

000384840

 
Cargando
Salesforce Help | Article