web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Multiple related records in a document template

(0) ShareShare
ReportReport
Posted on by 90

Hello all, and apologies if this is an old question but I cannot seem to get anywhere with it.

I have a document which basically comprises two parts. The first is an account summary section which is basically just account name and the content of the description field. The second part is what's causing my problem. We have a custom object called 'Advice' where we store all the consulting advice we have given our customers. This obviously will be different numbers of records for each customer. What we want is to pull the template for the account, have it fill the summary section (which it does) and then repeat the Advice section for each related record. What it actually does is simply return the most recent one.

Is there a way to do this? I'm happy to do it either in Dynamics template or Power Automate (or even write a macro if I have to, but I don't relish the thought of that!). What we definitely don't want to do is copy out the records to the customer document by hand, which feels like might be where we're going at the moment.

Thanks in advance for any help you can offer!

Nick

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    You can do this with a document template.  Follow my images.  Settings > Document Templates.

    Then, new, I picked Word below, choose entities.

    Next page pick your relationships, then download the word template.

    Developer tab > XML mappings.

    When done you upload this and it should be available on the main entity records(accounts in my images)

    pastedimage1609360656156v1.png

    pastedimage1609360674745v2.png

    pastedimage1609360697213v3.png

    pastedimage1609360742286v4.png

  • nickellis74 Profile Picture
    90 on at

    Thanks Mike for the prompt and thorough response. I really do appreciate it.

    The problem is, that's exactly what I did. As I say it filled the main object stuff nicely, but only returned the first of the related records. Is there something I have to do in the Word document to make it read the full set?

  • Suggested answer
    Community Member Profile Picture
    on at

    Was it inside of a table? See this article, I've seen it done, by a friend, so I asked him if he did anything special.

    debajmecrm.com/.../

  • nickellis74 Profile Picture
    90 on at

    Thanks Mike. I'm beginning to suspect there's no way to do what I want to do, which surprises me.

    What I really want to do is have a separate page for each of the related records, producing a kind of catalogue of advice. Here's a screenshot of a very basic first draft of the page:

    Screenshot-2021_2D00_01_2D00_04-101048.png

    Obviously that's not a table in the sense you meant above (although that is very helpful for other use cases, so thank you for that!). I fear I'm going to have to do something hideous with scripts in Word to achieve what I need :-(.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 98

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 60 Super User 2025 Season 2

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans