tracking code
LBMC Technology Solutions
  • Home
  • Solutions
    • Dynamics 365
    • Dynamics NAV
    • Dynamics GP
    • Dynamics CRM
    • Sage Intacct
    • Document Management (ECM)
    • Network Engineering and IT Solutions >
      • IT Security
      • Managed IT
      • Business Phone Systems
  • Events
    • All Upcoming Events
    • Training / CPE
    • Webinars and Workshops
  • Resources
    • Blog
    • Forum
    • On-Demand Webinars
    • Referral Program
    • Services We Offer
    • Support
  • About Us
    • Careers
    • Partner with Us
    • Community
    • Contact Us

Retrieving an Original Document Template from Dynamics 365 Customer Engagement

3/7/2019

0 Comments

 
Posted by Paul Haag
​

Picture
Document (Word or Excel) templates in Dynamics 365 allow you to merge CRM data into a pre-formatted document. Details on that process can be found here: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/using-word-templates-dynamics-365.
​
Unfortunately, once you create the template, there’s no straightforward way to download the original template again from Dynamics 365. So, if you decide you want to make a change and can’t find the original document, you must go through the exercise of remapping all the Dynamics 365 data fields.
​
With the web API and a couple of online tools, though, you can get back up and running.
​
1. In a browser (not Internet Explorer), run the URL you will need to download the template (replace the highlighted bits with the correct values for your CRM system and template): https://yourtenant.crm.dynamics.com/api/data/v8.1/documenttemplates?$select=name,content&$filter=name eq 'Your Template Name'

2. Take the result and make it a little easier to read by copying and pasting it into a JSON formatter (like JSON Pretty Print).

3. This will result in a very long bit of text, but the part you want is between the quotes for the content (example content value highlighted below): {
  "@odata.context": "https:\/\/yourtenant.crm.dynamics.com\/api\/data\/v9.0\/$metadata#documenttemplates(name,content)",
  "value": [
    {
      "name": "Your Template Name",
      "content": "UEsDBBQABgAIAAAAIQAr[content truncated for brevity]==",
      "documenttemplateid": "31418de7-0c19-e911-a97e-000d3a10877d"
    }
  ]
}

4. The “content” is the Word or Excel file, but encoded in a special web-friendly format called Base 64. This can be transformed back into the original file by using a decoder service like the one available here: https://www.freeformatter.com/base64-encoder.html
  1. Paste the content value in the box to decode.
  2. Click the DECODE AND DOWNLOAD button.
  3. When saving the file, change the extension to .docx or .xlsx (depending on if it is a Word or Excel template)
  4. Open the downloaded file.

Picture
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.


    Blog

    ​Your one stop shop for technology.

    Categories

    All
    Business Central
    Dynamics 365
    Dynamics CRM
    Dynamics GP
    Dynamics NAV
    Events
    Microsoft Dynamics Add-ons
    Software Decisions
    Tutorial

Solutions
Microsoft Dynamics 365
    Business Central
    Customer Engagement
Microsoft Dynamics NAV
Microsoft Dynamics GP
​Microsoft Dynamics CRM
​Sage Intacct
​
Network Engineering

​ERP Comparison Guide
Learning Opportunities
All Upcoming Events
User Conferences
Training / CPE
Vision
Webinars & Workshops
​

Resources
Blog
Forum
Referral Program
​​YouTube Channel

Company
About Us
Careers
Contact Us
​
Locations
Charlotte
Knoxville
Nashville
Picture
Picture
Proudly powered by Weebly

Sitemap | Home | Careers | Contact Us

share

Copyright © 2019

LBMC Technology Solutions