• Release History
  • Documentation
  • Back to www.mscrm-addons.com
  • Release History
  • Documentation
  • Back to www.mscrm-addons.com
home/Knowledge Base/Template Designer(DCP)/How to use the “Insert as HTML” option in DocumentsCorePack Templates

How to use the “Insert as HTML” option in DocumentsCorePack Templates

1559 views 0 Updated on May 24, 2023

This feature enables you to easily insert content (pictures, texts, etc.) into documents that have been added to a Dynamics 365 record in HTML format, via the rich text editor. This functionality interprets HTML code stored in Dynamics 365 and displays the content appropriately in generated documents.

Prerequisites: Before you can use this functionality, it is required to support HTML within Dynamics 365 itself. Next to 3rd party providers, Microsoft provides Out-of-the-Box capabilities to enter HTML via the rich text control as described here.

Step-by-Step: Add “rich text” capabilities to a field in Dynamics 365.

In this example, we want to insert the content in the HTML editor from Dynamics 365 into a quote.

❶ Open Power Apps.
❷ Navigate on the left to Tables.
❸ Select the table you want to open.
❹ Click on the three dots and open the table (in this example it is Account).

Insert the HTML editor content into a quote
Figure 1: Insert the HTML editor content into a quote

This overview is shown (see Figure 2), open ❶ Forms.

Open Forms
Figure 2: Open Forms

When Forms opens:

❶ Click in the Description field.
❷ Navigate to the right side and add it with + Component.
❸ Select the Rich Text Editor Control.

Add Rich Text Editor Control
Figure 3: Add Rich Text Editor Control

Confirm with Done.

Confirm Rich Text Editor Control
Figure 4: Confirm Rich Text Editor Control

Step-by-Step: Using the “Insert as HTML” option to load content from a Rich Text field into a document

In our example, we have added a rich text field to the Quote entity. We added the company´s logo and a price table.

First, open a ❶ Quote in your Dynamics 365. As you can see on the right side, the ❷ Description field is editable. Now you can add and format accordingly. Don´t forget to ❸ Save or Save & Close.

Open a quote and add/format accordingly
Figure 3: Open a quote and add/format accordingly

Please note: If the number of characters is too small, you must increase the field length in your Dataverse accordingly.

Next, open a Word document and navigate to the ❶ mscrm-addons.com tab. To begin creating your template, click on the ❷ Insert MailMerge Fields, navigate to the right, and click on ❸ Description. Then on the bottom-right, hit the Insert Field button and then ❸ Insert “Description” as HTML.

In this example, we prepared a Quote with an additional ❸ <<description>> field. Don´t forget to ❹ save your template.

Create and save your template
Figure 4: Create and save your template

Now you can test and utilize your template.

Test and utilize your template.

Figure 5: Test and utilize your template

Troubleshoot

If you notice that some special characters (like the Euro sign (€) in the figure below) are not displayed properly, it may be due to the encoding.

Special characters due to issues with encoding
Figure 6: Special characters due to issues with encoding

In this case, open the template, set the cursor in the Description field, and change the setting via the Field properties to:

HTML Type: Typ 4
Encoding: UTF-8

Confirm with OK.

Edit, save, and test the template again after troubleshooting
Figure 7: Edit, save, and test the template again after troubleshooting

Test your template again to ensure it is now working correctly.

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.

Was this helpful?

Yes  1 No
Related Articles
  • Dynamic document Header & Footer selection via the DocumentsCorePack Dialog
  • How to format dates within a document name
  • How to create a nested table structure 
  • Integrating JSON data into documents
  • Simplify Contract Processes with Dynamics 365 + E-Signature 
  • How to update the metadata in the DocumentsCorePack Template Designer
Latest Articles
  • Impact of Microsoft changes regarding email storage in Dataverse
  • Dynamic document Header & Footer selection via the DocumentsCorePack Dialog
  • Azure Blob Storage: Setting Recommendations 
  • Migrating One-Click-Actions Using the Data Migration Tool 
  • Force Service to be the only document-generating service
Popular Articles
  • DocumentsCorePack Template Designer – Getting Started
  • Step-by-Step: How to configure a One-Click-Action
  • Where do I find the Unique Organization name in Microsoft Dynamics 365?
  • mscrm-addons.com Application Access for Dynamics 365 (App Access) – DocumentsCorePack
  • DocumentsCorePack Online Service Configuration
Top Rated Articles
  • “Undefined”-labels in Chrome and Edge 114 and higher
  • IMPORTANT information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack connector for PowerApps & Microsoft Flow
  • Step-by-Step: How to configure a One-Click-Action
  • How licenses are counted
Categories
  • *News and General Infos* 52
  • Webinars 37
  • Template Designer(DCP 184
  • DocumentsCorePack(DCP 203
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 64
  • PowerSearch (PS 48
  • ActivityTools (AT 59
  • SmartBar (SB 53
  • GroupCalendar (GC 46
Our Vision

“We see it as our purpose to provide products that simplify and speed up our customers’ Microsoft Dynamics 365 experience.”

Knowledgebase
LogIn
mscrm-addons.com
  • Products
  • Online Shop
  • Downloads
  • My Account
About Us
  • About Us
  • Case Studies
  • Newsletter
  • Partner Program
  • Contact
Support
  • Support
  • Terms & Conditions
  • Documentation
  • Webinars
  • Legal Documents
  • Impressum
  • © 2022 www.mscrm-addons.com. All Rights Reserved.