25 Sep’17

Dynamics 365, EnterpriseCRM Tip: Automatically Creating document from Word Template and attaching to Record


In Dynamics CRM, one of the common requirement customer have is to Run a report and save the copy of the report (PDF/ Word/ Excel) as notes/ attachment on the record or send the created document as email attachment to customer.

Sounds an innocent requirement, right? With CRM online, it is NOT.

What we do to achieve this till now

We do one of the following when the customer asks this request:

  • Ask user to manually run report, download PDF and create email record or attach to record notes.
  • Use some paid 3rd party tool.
  • Tell the customer it is not possible For CRM Online. 😀
  • For On-prem CRM, developers would tweak the Report Viewer and somehow manage to achieve this with lot of effort and custom plugins.


With Dynamics 365, you have one alternative which does not exactly give you the above solution but is very close or may be acceptable adjustment to client.

We all know CRM 2016 also introduced word templates. But with D365, CRM has inbuilt Action to Run a word template and attach that to document without user action.

Since it is an action, it can be used in Workflows, Plugins, other actions and even in JavaScript using Web API.


I have created a workflow on Account Credit limit update, such that when credit limit is more than 10,000 an Account summary will be created using the Account Summary template and attached to the record.

See screenshots below of the workflow and generated document. All this without user intervention.

Pic 1 -Select Perform Action and Select Action – “Set Word template”
Pic 2 – Select the Target account record and the Word template in Action Properties
Pic 3 – Created document from the workflow- attached to the record.


  • We cannot create PDF documents using this approach
  • This is limited to Word templates and they are not yet as powerful as SSRS reports

Next Steps:

  • We can extend this functionality by may be having plugin on notes creation to send an email to customer or any other thing?

Please post your comments/ suggestions below.

Happy CRM’ing

Written by

Somesh Siripuram

CRM Team Leader

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

Want to streamline your business processes?

  • This field is for validation purposes and should be left unchanged.

Recent Articles

  • Dynamics 365 Client Diagnostics

    15 March’ 2018

    Main cause of Performance Issues: Bandwidth and latency are the primary characteristics which affects the performance o...

    Read more
  • Closing Blind Shift in MPOS and CPOS in Dynamics 365 for Retail

    15 March’ 2018

    Manual For closing Blind shift in POS: Blind shifts terminate the currently ongoing shift and when logged in a new shif...

    Read more
  • Persistent Filters in the Power BI Service

    13 March’ 2018

    Introduction: The feature is finally release, and it is power BI has announced general availability of persistent filt...

    Read more
  • Cause and Solution for Scribe MSMQ not receiving Message from AX

    10 March’ 2018

    Issue: Microsoft Message Queuing (MSMQ) service running on Server might be unable to receive messages. Therefore, messa...

    Read more
  • User Privileges on SharePoint – D365 Document Integration

    10 March’ 2018

    Overview: Often, we wonder what could be wrong where we see a generic error on Documents in Dynamics 365. Something lik...

    Read more