{Tips & Tricks}–Show repeating content in Dynamics CRM 2016 word templates

Well, let me be very honest here. I hated to write this blog post. But to my surprise, I am finding lot of people wasting their valuable on this small stuff. So I thought, let me pen down this rather insignificant stuff so that it can help at-least someone stuck with the same issue.

I am not going to document here regarding the word template generation feature of Microsoft Dynamics CRM 2016. My personal favorite – http://crm.fueledbysleep.com/no-code/the-new-features-of-dynamics-crm-2016-how-to-use-them/#comment-3336 which explains both how you can use the word and excel templates to your advantage.

Here I am going to explain how to generate repeating content, for example – show all the emails related to an account.

First I download a template for the account entity. How to do it, you can find from the above post. As I am interested only in the emails, I have just included that relationship.



Now I insert a table. I wanted to include From address, to address and the subject of the email. So I create a table with the appropriate headers. I select a 3×2 table as I need an empty row after my header.



Now I select each of the three cells in the empty row of the above table and then insert appropriate fields. Another important point to note here is, if you want to display the From and To fields of the email, do not select the from and to. Instead select the fields – sender and torecipients. Otherwise the fields won’t display anything.



Now comes the important part. Select the entire row (all the cells of the row) using the cursor (do not select the table or the row from the table border)

Once the entire row is select, right click the relationship and then select Repeating as shown in the screenshot below.



It would look like something as below once you are done with the whole process. The biggest mistake people do here is select the entire table or select the entire row from the border of the table. If you do that, the table won’t be visible at all.


Save and upload the document template. To do this, please refer to the link I provided. Now once you view the template in the context of the account record, you can see all the emails.



Pretty layman stuff but hope it saves you some time.

About Debajit
I am a Dynamics CRM Most Valuable Professional (MVP) with 12 years of experience in Microsoft .NET Technologies and 9 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side. Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com Author of multiple tools on codeplex including the 'Role Based Views' and 'CRM-Sharepoint Metadata manager & Attachment Extractor' which are available for commercial use under XrmForYou.com For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

10 Responses to {Tips & Tricks}–Show repeating content in Dynamics CRM 2016 word templates

  1. Jeff Woodard says:

    Nice post! do you know if there’s any way to filter out inactive rows from the repeating rows?

    • Debajit says:

      Hi Jeff,

      Thanks for the appreciation.

      AFAIK Dynamics CRM word templates unfortunately does not have the option to filter records by view.

      Debajit Dutta

  2. Gerard says:

    I know this is old and question slightly off topic. When including the Notes field in a repeater the template output does not honor Carriage Returns. All notes are strung together. Any idea if this can be manipulated?

    • Debajit says:

      Hi Gerard,
      I remember facing this issue about an year back during one my demos to a customer.
      Let me just replicate this in this environment and then check for solutions.
      I will get back to you on this.


    • Debajit says:

      Hi Gerard,

      I know it has been sometime. I was mostly on the road and kind of stuck up. Sorry for that.
      While inserting a content control, you get two options, one is plain text control and other is rich text control.

      Could you try the rich text control and check if the carriage returns are respected.


  3. Tim says:

    Debajit, Thanks for this post. I remember finding it last time I had to touch this area of CRM (almost never). Quick and easy to follow.

    I have a situation where I want to repeat content for an entity as you describe, but also include a couple fields from a related entity. Though both relationships are included in the template, of course the “Repeating” designation is made once for the row. I’m getting the data for the repeating row, but the related entity data is not displaying. Is there a trick to this that you are aware of?

    Thanks again

    • Debajit says:

      Hi Tim,
      Thanks for reading my blog post.

      I will check on this and revert.

      Best Regards

    • Debajit says:

      Hi Tim,

      I did a check on this. The problem is when you select repeating binding, internally word document will associate the dataset with the following path – w:xpath=”/ns0:DocumentTemplate[1]/account[1]/Account_Emails”. Here in my example, I applied a repeating content of emails associated with the account.

      Since for the repeating content, it goes directly to the child entity, I think the only way you could achieve this is by mapping the properties of the related parent in the child entity. and then include those fields in the repeating content.


  4. Chuck Bushey says:

    So I have been searching for how to do a repeating row of data that also has repeating data underneath it. So for instance in Dynamics NAV we have Jobs which have Task Lines and then under them has Planning Lines. I am trying to build a Word document report to serve as a Quote/Contract that would have the Task lines repeating which I have and works fine, but under each repeating Task line I would like to have its repeating Planning lines nested underneath it to show more detail of the job.

    I have not been able to find anywhere that this is explained how to accomplish or if it even can be accomplished. Any ideas?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: