AnsweredAssumed Answered

Opportunity Product Line Items not working

Question asked by askebongsaxe on Apr 20, 2017
Latest reply on Apr 24, 2017 by ryan.oleary

Hello all.


I'm a Salesforce consultant, and I'm using Drawloop Document packages for Salesforce for the first time. I've tried to read the documentation, but I'm so far unable to find the answer to my question.


I'm trying to create an invoice document based on an Opportunity record with Opportunity Products. I'm able to create a merge template which works with all of my standard and custom Opportunity and Opportunity Products fields. However, so far I'm only able to get one Opportunity Product record into my merged document.



My .docx template file looks like this:




Here are the tags I'm using in more readable terms:

  • Product: <<Opportunity_LineItem_Product2>>
  • Quantity: <<Opportunity_LineItem_Quantity>>
  • Unit Price: <<Opportunity_LineItem_UnitPrice>>
  • VAT Amount: <<Opportunity_LineItem_VAT_Amount>>
  • Total Price: <<Opportunity_LineItem_TotalPrice>>


Here is a screenshot of the relationship I have defined as part of my document package:


Imagine that my data look like this - 1 opportunity record with 2 opportunity product line items on the Products related list:


Opportunity Name "Invoice 2354"

  • Opportunity Product "iPhone 7 64 GB"
  • Opportunity Product "Samsung Galaxy S7"


When I create a document based on this template I would expect that section of my invoice to look like this:


ProductQuantityUnit PriceVAT AmountTotal Price
iPhone 7 64 GB1£600£120£600
Samsung Galaxy S72£400£80£800


But in reality the document I get only contains the first row:


ProductQuantityUnit PriceVAT AmountTotal Price
iPhone 7 64 GB1£600£120£600


I can't figure out what is missing or what I'm doing wrong. I would really appreciate your help. Thank you.


Best regards,