This feature enables you to easily insert contents (pictures, texts, etc.) into documents which have been added to a Dynamics 365-record in HTML format via e.g. the “Rich Text Editor”. The functionality interprets HTML code stored in Dynamics 365 and displays the contents 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 content originated from HTML editor from Dynamics 365 into a quote.
❶ Open Power Apps and navigate on the left to
❷ “Data”, click
❸ “Tables” and select
❹ “Forms” in the line below, look for
❺ “Quote”. To open it, hit the three dots and click
❻ “Edit form”. Or just double-click on Quote.
When this overview opens, please
❶ Click in the “DESCRIPTION”-field, navigate to right side and
❷ Add with [+ Component]
❸ the “Rich Text Editor Control”.
❹ Confirm with done.
Step by Step: Using the “Insert as HTML” Option to load content form a Richt Text field into a document
In our example we have added a Rich text field to the Quote entity. In this example we added the company´s logo and a price table:
First, we 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. Don´t forget to ❸ “Save” or “Save & Close”.
Please note: If the number of characters is too small, you have to increase the length of the field in your Dataverse accordingly.
Here comes the exiting part: Open a Word document and navigate to the ❶ mscrm-addons.com-tab. To start creating your template click on the ❷ [Insert MailMerge Fields], navigate to the right, click on ❸ “Description” and then on the right bottom, hit the [Insert Field]-button and ❸ [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 your template and enjoy the result.
If you notice that some special characters (like the €uro 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].
If you now are trying to test your template again, you will see that it is working correctly now.
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to firstname.lastname@example.org.