In my last post, XrmToolbox plugin update – Document Template Manager, I provided some updates to my plugin to allow moving documents into downstream environments. This was a missing feature that I was happy to finally add to the plugin.

I’m sure it’s clear from my posts that I see the XrmToolbox as a powerful tool for managing your Dynamics CRM environments and development process. Unfortunately, as a project complexity increases so does the need to automate regular processes. Automation saves time for your team and also reduces the chance for error during your development, deployment, and system maintenance.  So while hoping to add value to my current Document Template Manager plugin, I felt the ability to automate the move as part of a DevOps process would be even more helpful.

To the Console!

A few months ago, I ported the Portal Records Mover plugin to a console application (see my post XrmToolbox Portal Records Mover as a Console Application), and I decided to do the same with my Document Templates Manager plugin. You can now automate the process of moving your Document Templates from one environment to the next, such as from your DEV instance to a TEST or STAGING environment.  This port is relatively simple, just a bit of code to download the Document Template contents and upload it to the target environment.  I’ve added some additional features and settings that I think would be helpful:

  • Export only – An option to only export from the source system. This is intended for automated DevOps processes that exports solution contents for source code checkin on a periodic basis
  • Import only – An option to only import into the target system. This is a helpful option if you are doing some work on several documents and want to deploy all during development
  • Filters – You can specify a simple filter on the document template name.  For example, only include Document Templates with “Summary” in the name
  • Template Type filter – Filter the export and import by the Template type, either Word, Excel, or both Document Templates types
  • Entity Type Filter- Filter the export and import Word or Excel Document Templates for a specific Entity by it’s Entity Logical Name
  • Logging only – Only output the logging of the actions to be taken without the actual export or import. This is helpful in testing the different options without actually downloading or uploading

More details on these settings can be found in the sample configuration file at the GitHub repository. So check out the utility, tear up the code, and drop me a line with comments and suggestions!  If you happen to find an issue, please report it within the repository and I’ll take a look. I plan on leveraging the tool for one of my current customers over the next few weeks so I will continue to provide updates as needed!

0 Points

Leave a Reply

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