DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 975770 - Last Review: February 11, 2010 - Revision: 2.0

SYMPTOMS

You have an e-mail template that has HTML code that is contained in a template field in Microsoft Dynamics CRM 4.0. Then, you create an e-mail message that uses the e-mail template. However, the HTML code that is contained in the template field is displayed unexpectedly as plain text. You expect the formatted HTML code instead of the plain text of the HTML code to be displayed.

CAUSE

This problem occurs because the e-mail template tries to make the HTML code safe when the e-mail template detects any HTML formatting. This behavior prevents rogue HTML code or scripting code from being run in the CRM e-mail form.

RESOLUTION

This problem is fixed in the latest cumulative update rollup for Microsoft Dynamics CRM 4.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
949256  (http://support.microsoft.com/kb/949256/ ) Microsoft Dynamics CRM 4.0 updates and hotfixes


After you install the latest update rollup for Microsoft Dynamics CRM 4.0, you have to add the EmailTemplateBodyHTMLNoEncode registry key. To do this, follow these steps:
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756  (http://support.microsoft.com/kb/322756/ ) How to back up and restore the registry in Windows
  1. Click Start, click Run, type regedit, and then press ENTER.
  2. In Registry Editor, locate the following subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM
  3. Right-click MSCRM, point to New, click DWORD Value, and then type EmailTemplateBodyHTMLNoEncode.
  4. Double-click EmailTemplateBodyHTMLNoEncode, and then type 1 in the Value data field.

    Note When the EmailTemplateBodyHTMLNoEncode registry entry is set to 1, Microsoft Dynamics CRM decodes the HTML code in the template body, and then the formatted HTML code is displayed. However, if the EmailTemplateBodyHTMLNoEncode registry entry is configured to be 0, or there is no EmailTemplateBodyHTMLNoEncode registry entry, the e-mail template body is not encoded. Therefore, the HTML code is unexpectedly displayed as plain text.
  5. Click OK.


APPLIES TO
  • Microsoft Dynamics CRM 4.0
Keywords: 
kbqfe kbfix kbsurveynew kbmbsmigrate kbexpertiseinter KB975770
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support