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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to generate word document with dynamic content via plugin?

(0) ShareShare
ReportReport
Posted on by 592

Im trying to create CRM plugin which will open Word template, fill it with data. How I can map the dynamic content fields inside plugin ? 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    JandostKhoso Profile Picture
    266 on at
    RE: How to generate word document with dynamic content via plugin?

    Since the word document is going to be filled with your data from entities, I would recommend to fill the entity fields in your plugin rather than generating the word document. Once the entity fields are filled, you can fire a workflow in which you can generate your word document. I would not go with generating a file in my plugin.

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: How to generate word document with dynamic content via plugin?

    Take a look at this thred: community.dynamics.com/.../c-replace-email-template

    Hope this helps.

  • MS CRM DYNAMICS Profile Picture
    592 on at
    RE: How to generate word document with dynamic content via plugin?

    Hi Jandost,

    Suppose I have created the document in workflow , can I able to do below points with workflow. ( I dint want to attach to notes section)

    1. I need to pass the document to azure blob

    2. Download the document

  • Suggested answer
    JandostKhoso Profile Picture
    266 on at
    RE: How to generate word document with dynamic content via plugin?

    Hello Bhabani,

    Yes, you can easily write a code in your workflow to push the generated document to Azure. Another alternative is to explore using Flow. That will make it much easier.

    I believe Microsoft is planning to release a functionality to push attachments to Azure but I am not sure about the timelines. However, at the moment you can write a code to push generated document to Azure. Till then I suggest to use Flow.

    What is the trigger for the download the file? Please note that even in the plugin you cannot download the file. I think you still need to upload the file somewhere and then download it.

  • Suggested answer
    Dharanidharan Profile Picture
    638 Super User 2025 Season 2 on at
    RE: How to generate word document with dynamic content via plugin?

    You can use the workflow to generate the word document with the Dynamic content.Below is the URL for your reference.

    https://community.dynamics.com/crm/b/nakedcrm/posts/how-cool-creating-word-documents-using-a-workflow

  • MS CRM DYNAMICS Profile Picture
    592 on at
    RE: How to generate word document with dynamic content via plugin?

    Hi Jandost,

    I have tried creating the document in custom workflow which I can pass to Azure blob but seems like this is not possible. (tried in Plugin as well). Below error while tried in plugin and custom work flow. I am  able to create in workflow or action only, but how I can pass the same document to azure. Any suggestion?

    "The request SetWordTemplate cannot be invoked from the Sandbox "

  • Dharanidharan Profile Picture
    638 Super User 2025 Season 2 on at
    RE: How to generate word document with dynamic content via plugin?

    Did you get a chance to go through my above link. It's not through custom workflow its through OOB workflow. Please check it out.

  • MS CRM DYNAMICS Profile Picture
    592 on at
    RE: How to generate word document with dynamic content via plugin?

    Yes Dharanidharan, I did and I am able to create but after that I need to pass the file to azure blob? how I can pass to Azure from OOTB workflow?

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans