This article explains why only the first instance of Opportunity Line Item merge fields is populated when using Mail Merge in Salesforce.
When a Mail Merge Template in Salesforce contains Opportunity Line Item fields in more than one location, including the «OPPORTUNITY_LINEITEM_START» and «OPPORTUNITY_LINEITEM_END» merge fields, only the first set of these merge fields is populated. Subsequent instances of these merge fields in the same template remain empty after the merge is completed.
This behavior is by design in Salesforce Mail Merge. The «OPPORTUNITY_LINEITEM_START» and «OPPORTUNITY_LINEITEM_END» merge field markers define a single repeating block for Opportunity Line Items in a Mail Merge Template.
Rules for Opportunity Line Item Merge Fields:
«OPPORTUNITY_LINEITEM_START» and «OPPORTUNITY_LINEITEM_END» markers.«OPPORTUNITY_LINEITEM_START» and «OPPORTUNITY_LINEITEM_END» markers may only appear once in a given Mail Merge Template.Extended Mail Merge Behavior
When Extended Mail Merge is enabled in your Salesforce organization, mail merge documents are delivered via email to the user who initiates the merge rather than being downloaded directly.
If a user is not receiving their mail merge document via email after enabling Extended Mail Merge, verify that all Opportunity Line Item merge fields are correctly placed within a single «OPPORTUNITY_LINEITEM_START» / «OPPORTUNITY_LINEITEM_END» block, and that these markers appear only once in the template.
000384435

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.