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.
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.
- We cannot create PDF documents using this approach
- This is limited to Word templates and they are not yet as powerful as SSRS reports
- 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.