This feature is introduced in Microsoft Dynamics CRM 2016 Version.
Word Templates in CRM 2016 helps you to create personalized Word Templates for the CRM Entities chosen.
Process of using Word Templates in MSCRM 2016 as below
- Navigate to Settings -> Templates -> Document Templates -> New -> Select Word Template and entity.
- To create a new document template, click on Document Templates as highlighted in the above image and then click on New button.It opens a pop up window as shown below.
- In the pop up window, there is an option to select either Word/Excel template. As we want to create a Word Template, select the Word Template as highlighted in the above image.
- Also, select the entity from the dropdown list and click on Select Entity.As example, let’s select Quote and proceed.
- Then it will open a dialogue box which has all 1: N, N: 1 and N: N relations for the selected entity. You can select one or multiple relations among them.
- Select the relation if you want to display the related data in word templates or else simply click on Download Template Button.
- Let’s select the quote products sub-grid having 1:N relation and potential customer lookup of either account/contact.
- Then after open the word template in MS office.
- When a fresh document is opened, the Developer tab is disabled. So, before moving ahead, enable the Developer tab so that the attributes are included.
How to enable the Developer Tab in MS Word?
- Go to-->file options
- Then it will open a pop up. Follow the below procedure as shown in the image for enabling the Developer Tab in MS Word.
- Click on OK to see Developer Tab in your word document.
- Now click on Developer tab -> Select XML Mapping Plane. The XML Mapping plane appears on the right side of the document.
- Select the link urn:Microsoft-crm/document-template/account/1/ from XML Mapping dropdown list as shown below.
- The attributes of the selected entities appear in the XML Mapping area.
Steps for selecting the attributes for the document
- For example, to display QuoteID right click on the attribute, effectivefrom from XML Mapping -> select the Insert Content Control and then select the Rich Text/Plain Text option.
- These steps are illustrated in the image below.
- After selecting Rich/Plain Text, the view will be applied as shown below.
- Do not capitalize the first letter of logical name of attribute. If the first letter appears to be in upper case then navigate to File option in Word Template -> select Option -> Select Proofing -> Click AutoCorrect Options.
- To display the records of the sub-grid, create a table and insert the attribute from Insert Content Control option.
- To display all records of sub-grid, first select a row from table then right click relationship entity from XML Mapping and then select the Insert Content Control followed by the Repeating option.
- You can see the output results as shown below.