Dynamics 365 — Document templates, guids and workflows
When it comes to guids, take your lead from the boy band NSYNC #HoskWisdom
I had a problem with Document templates, guids and getting out of sync between environments. When guids are out of sync, manual work is needed every time you deploy, this can add up to a lot time of the course of a project.
Document Templates are an impressive feature that allows you to create Word or Excel templates that work in a similar way to mail merge. Once you create the word template once, users can use them to generate a word document using values from Dynamics. Compared to SSRS reports these are lightening fast and anyone can create them.
To learn more, read these posts
- How to Create a Microsoft Word Template in Microsoft Dynamics 365
- MB 210: Microsoft Dynamics 365 for Sales — Word Templates
- Create and manage Word templates in Dynamics 365 Sales Professional
Sounds great, what’s the catch
It’s a powerful time-saving feature but Microsoft forgot to create a method to move these documents between environments. Microsoft want Dynamics 365 to create enterprise solutions but don’t provide the tools to do. To have functionality that you have to create manually isn’t a suitable solution.
Document templates are either Word or Excel document which you upload to Dynamics 365. When you upload the document it create a record in Dynamics with the word document attached.
Where you have records, you have guids and where you have guids, you need to keep those in sync between environments.
Microsoft would like you to manually create the document template in each environment. Doing this will create a different guid for the document template in each environment.
Why is this a problem?
When you use a document template in a workflow, it uses the guid of the document template record.
You might be wondering why you would use a document template in a workflow but the is a useful action created by Microsoft that allows you to create a document using a document…