Print this page

Can I use fields from related objects in my mail merge?

Knowledge Article Number 000003782
Description

Can I use fields from related objects in my mail merge?

Resolution

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 you to select fields from a related object, but only if this record has a relationship through a lookup field with the object you are merging from. If this record is displayed through a related list then the fields on the object you are merging from will populate correctly but those of the related object will not.

Related lists allow you to associate the record you are working with to multiple associated records. Because of this association to "many" records (regardless of it's actual associated record count) the mail merge will not be able to specify which record to pull values from, and will not populate any of the 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, the values from the secondary object will not be included within the merged document.

Example:

When running a merge from a contact record, you want to include fields from the Account record. The relationship from the Contact to the Account allows only one Account and so the merge will complete successfully.

If you attempt the same merge from an Account record, you will be instead merging to a multiple record relationship as there can be several Contacts on a single Account. This will cause the merge functionality to populate the Account data but none of the information for the Contact will display.

There is one exception to this. When attempting to use Contact details within an Opportunity mail merge, you are provided a field to select a Contact to merge the details from.

See also: 
Why can't I pull information from the account page when I am creating a Mail Merge on another object, such as cases, opportunities or a custom object?





promote demote