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).
This overview is shown (see 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.
Confirm with Done.
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.
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.
Now you can test and utilize your template.
Figure 5: Test and utilize your template
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.
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
Confirm with OK.
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 firstname.lastname@example.org.