How to merge CRM Word Templates from two related entities?

By Dianna on 7/14/2018

In this workflow we demo how to merge two secondary documents into a primary document.

The CRM workflow runs on the child entity and the primary document is created from Word Template of this child entity. In this example the child entity is the Order Entity. We merge the primary document with two other documents (the secondary documents) which are created from Word Template of two parent entities, in this example, Quote & Opportunity. The two locations where to insert the secondary documents in the primary document are marked with two placeholders in the Word Template, in the format of << placeholder >> where placeholder is constructed from letters, digits, and the “_” symbol only. The placeholder can be place anywhere in the document, as per this image. Note that the larger fonts are for presentation only.

 

The workflow is on the Order entity. The first step is to create an Email, followed by three steps of SetWordTemplate, a common step we use in Dynamics PDF-Docs workflows to generated document from a Word Template. Each of the three steps is to create the corresponding secondary and primary documents. Here are the properties set for creating the primary document.

 

To merge the documents select the workflow step: PDF-Docs> Merge Documents, and set the properties as per this image:

Author