25 Sep’17

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

Background:

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.

Alternative:

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.

Example:

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.

Limitations:

  • 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

Someswara 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

  • Reading more then 10K records in D3FOE OData API

    11 July’ 2018

    Introduction: We all know Dynamics 365 Finance and Operations has limitation of 10K records to be fetched at a time usi...

    Read more
  • Paging in D365 Customer Engagement v9.0

    10 July’ 2018

    Introduction: The Xrm.retrieveMultipleRecords method is used to retrieve a collection of records in Dynamics 365 Custom...

    Read more
  • Set up Dynamics 365 connection in Microsoft Social Engagement

    10 July’ 2018

    Introduction: This blog explains how to Set up Dynamics 365 connection in Microsoft Social Engagement. Steps to be follo...

    Read more
  • Voice of the Customer failed to install

    10 July’ 2018

    Introduction: Many people face issues in installing Voice of Customer solution on v9 environment and trying repeatedly ...

    Read more
  • Scribe Insight AX as a Web Service Find Block issue

    10 July’ 2018

    Introduction: If we need to look up for any value from AX then we do it by using a Find Block in Scribe Insight Eg: Basi...

    Read more