Word Template feature in Dynamics CRM 2016

By | February 1, 2016

The Word Template feature is introduced in the MS Dynamics CRM 2016. It is useful to create templates for enabling you to generate documents in a standardised format.

3 ways in which a word template can be created:

1. Navigate to Settings -> Templates -> Document Templates -> New -> Select Word Template and entity. This enables you to create a template for the entity which has been selected.

2. Navigate to entity. for e.g. for the entity, Quote. Navigate to Select a record -> click on more option (…) -> Select a Word Template and then click on “Create Word Template”

3. Navigate to entity for e.g., for the entity, Quote. Navigate to open a record -> click on more option (…)-> Select a Word Template and then Click on “Create Word Template”

Here are the steps to create a word template for the purpose of creating a Product Quotation template.

1. Navigate to entity e.g. If the entity is ‘Quote’. Navigate to select a record -> click on more option (…) -> Click on Word Templates -> Click on Create Word Template

2. Select a Word Template.

3. Select an entity from the drop down list, Filter by entity.

word template

4. Click the Select Entity button to select the corresponding relationship entity. Multiple relationship entities are selected. Here, the entities, ‘Quote Product’, ‘Account’ and ‘Contact’ are selected.

word templates

5. Click on the Download Template button. After the template gets downloaded, open a document 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.

Steps for enabling the Developer tab.

word options

Navigate to the Word Template file -> Click Options -> Navigate to Customize Ribbon -> Check Developer Option and then click OK.

6. Click on Developer tab -> Select XML Mapping Plane. The XML Mapping plane appears to the right side of document.

7. Select the link urn:microsoft-crm/document-template/quote/1084/ from XML Mapping drop down list.

xml mapping

The attributes of the selected entities appear in the XML Mapping area.

word template-xml mapping

8. To create template format.

Steps for selecting the attributes for the document

For e.g, for, Effective date right click on the attribute, effectivefrom from XML Mapping -> select the Insert Content Control and then select the Date Picker option.

word template_quote

word template quote

Do not capital the first letter of logical name of attribute.

Make sure that the first letter of the logical name of the attribute is in the lower case. If first letter appears to be in upper case, then navigate to File option in Word Template -> select Option -> Select Proofing -> Click AutoCorrect Options.

word template auto correct option

Uncheck the option Capitalize first letter of sentences from Auto Correct tab and click on OK button.

capitalize first letter

9. Select the customer name then right click customeridname and select Insert Content Control and select the Plain Text option.

word template_quotation

10. To display the records of the sub-grid, create a table and insert the attribute from Insert Content Control option.

word template_example

11. 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.

word template_example

12. Save the document in .docx format.

13. 3 ways which could be used to upload a template:

Navigate to Settings -> Templates -> Document Templates -> UPLOAD TEMPLATE and then Browse the template.

NOTE: While uploading the word template through this step, the document is displayed in Word Templates under the Word Templates option.

Navigate to entity for e.g., for the entity, Quote -> Select a record -> click more options (…) -> Select a Word Template -> Click Create Word Template -> Click the Upload button -> browse the file.

Navigate to entity for e.g., for the entity, Quote -> Open a record -> click more options (…)

-> Select a Word Template -> Click Create Word Template -> Click the Upload button and browse the file.

NOTE: While uploading the document through the 2 ways mentioned above, the document is displayed in the Personal Word Template under the Word Template option.

14. In order to send the quotation to the customer, Select a customer record -> click more option (…) -> Select a Word Template -> Click Uploaded template for downloading the document. After opening the document, it would appear as per the screenshot mentioned below.Word template

NOTE: The word template feature is for a single record. In case of multiple records, the word template option is not displayed.

One Pic = 1000 words! Analyze data 90% faster with visualization apps!

Get optimum visualization of Dynamics 365 CRM data with –
Kanban Board – Visualize Dynamics 365 CRM data in Kanban view by categorizing entity records in lanes and rows as per their status, priority, etc.
Map My Relationships – Map My Relationships – Visualize connections and relationships between Dynamics 365 CRM entities or related records in a Mind Map view.

19 thoughts on “Word Template feature in Dynamics CRM 2016

  1. Mez

    Your QUANTITY field displays the values 1,00000 and 2,00000
    In the Mail Merge feature for Word you could format the fields so less digits would show in the document.
    Do you know how to do this for the XML fields?

    1. inogic

      Mez,

      Right now the field formatting is not available at the word level.

      So you need to do that through the customizations in CRM i.e., by changing the precision at the field level.

      Thanks

  2. Mez

    Thanks for your earlier replies.
    If I would like to group my products in a template so “goods” are in one table and “services” are in another, is that possible? It would be based on Producttypecode.

    1. inogic

      Hi Mez,

      We are always happy to help our Dynamics CRM friends.
      To answer your question, User will not be able to create separate table using group by producttypecode. All products are displayed only in one table.

      Thanks!

  3. inogic

    Hi Ashish,

    After making the Quote Details as Repeating, also make sure that you have mapped the fields from the Quote Details entity in the row were you want to see the data from CRM.

    Thanks,
    Sam

  4. sea

    How can one sort by date in a table without asking the end user to sort every time ?
    I have a list of bookings and want to open the file then print, but usually we add a new order which is before the a number of orders.
    E.G: OR1 01/01/2018 12:00
    OR2 01/02/2018 12:00
    OR3 03/01/2018 13:00
    OR4 01/01/2018 13:00

    I need the outcome to be :
    OR1 01/01/2018 12:00
    OR4 01/01/2018 13:00
    OR3 03/01/2018 13:00
    OR2 01/02/2018 12:00

    1. Inogic

      So, basically you want to sort the Booking records that you are showing in one of the table in the word template, right?

      If that’s the case, then below is what Microsoft says about the lists in Word Templates.

      Hope this helps.

  5. Jorge Abiad

    2 Questions:
    1. How to retreive N:N relationship in display the rows in word template using CRM 365?
    2. How to add another primary entity in the word template?
    Basically, the logic is Opportunity .-> Quote (1:N)
    Quote –> Scenario Line Items (1:N)

    1. inogic

      Hi,

      Please find below answers.
      A. How to retreive N:N relationship in display the rows in word template using CRM 365?
      For this scenario I am considering N:N relationship of Opportunity-Competitor.
      Follow the below steps to configure word template on Opportunity entity.
      1. Navigate to entity e.g. If the entity is ‘Opportunity’.
      2. Select a record then click on more option (…) -> Click on Word Templates -> Click on View All My Templates.

      word template

      3. Select New -> Download to Create Word Template.

      word template

      4. Then select opportunity in the entity and select Competitor in N:N relationship as shown in below screenshot, then click on download.

      word template

      5. Open downloaded word document. Click on developer tab -> select XML Mapping Plane select the link urn:microsoft-crm/document-template/opportunity/3/, you can see Opportunity xml mapping as below

      word template

      6. After expanding it you can view both the relationships as opportunity_competitors and
      competitor_opportunities

      word template

      B. How to add another primary entity in the word template?
      No, you cannot add another primary entity in the word template.

      Thanks!

  6. Sumit

    I am using rich text editor whose data is stored in a multiline of text field which contains HTML text. Is there any way to generate a word document without HTML text and without removing formatting

    1. inogic

      Hi,

      Here, do you mean you are saving data of Rich text box in a CRM multiline field as HTML format? Then do you want this to be displayed in the same format in Word Template without affecting the existing format in HTML?

      If this is correct then we do not find the option to display HTML text in Word Template without affecting the format, here CRM data is considered as plain data and we can add additional formatting as per available options in Web Template.

      Thanks!

  7. Deborah Burgesser

    Hello,
    Is there a way to have fields like Address 2 not show blank data rather have Address 3 move up to Address 2 position? Or if no Address 2 or 3 not display and have City Display under Address 1?
    Deb

    1. Inogic

      No, there is no out of the box way to add conditions in word templates to display data.

      Thanks!

  8. siena

    Hi,
    I cant seem to add the contact details of the contact person for the Company being quoted.
    I can get their name using ‘parentcontactidname’ but i cant put their email or phone. What XML do i use for it? non of the other email or phone XML work

    1. Inogic

      Hi Siena,

      To access the related entity record you need to specify the relationship before downloading the Word Template.

      In your case, you need data from the parent entity then select your required relationship in the below N:1 relationship Multiselect option set field like below.

      After downloading the Word Template you must see the one extra section with the relationship name inside your primary entity section.

      Expand it and use the field of the related entity in the word template.

      Hope this helps!
      Thanks

  9. James

    Has anyone figured out a way to pick up the user’s name / email / department when generating a letter from a template? Ideally we would like to put this information in a signature section at the end of the letter.

    1. Inogic

      Hi James,

      As of date, it is not possible to pick up the logged-in user information in a word template.

      Thank you for your comment.

Comments are closed.