Replacing a Field Label in Microsoft Dynamics CRM with an HTML Web Resource

By - December 11, 2013

When configuring forms within Microsoft Dynamics CRM, a form’s field label has a 100 character maximum. In certain instances, 100 characters is not enough. This issue is often encountered when configuring questionnaires in CRM. Questionnaires can be a very useful tool throughout the sales process (e.g. evaluating the feasibility of a prospect). For purposes of this blog, let’s say you need to add the following question to the account form:

Does the organization meet the requirements under section 501(c)(3) of the Internal Revenue Code (i.e. tax-exempt)? [Yes/No]

Initially, this appears to be a very simple task. However, the text exceeds 100 characters therefore you have two options:

  1. The text can be rephrased using less 100 characters. For example, the question above can be easily replaced with the following succinct field label:
    • Tax-Exempt Status: [Tax-Exempt/Taxable]
  2. When the question/label cannot be shortened, CRM’s field label can be replaced with an HTML web resource (as recommended in numerous posts)

The following steps illustrate how to replace a field label with an HTML web resource. In the screenshot below, the Tax-Exempt label will be replaced.

campbell nov 1

Steps to add an HTML Web Resource:

  1. On the account form, click the ellipsis and click the “Form” optioncampbell nov 2
  2. Find the “Tax-Exempt” field on the form editor
  3. Double click on the field
  4. In the “Field Properties” pop-up, uncheck “Display label on the form”campbell nov 3
  5. Click OK
  6. In the “Field Properties” window, on the Insert tab click “Web Resource”campbell nov 4
  7. In the web resource lookup, click the New button
  8. Enter a name for the resource and select “Webpage (HTML)” as the type
  9. Click the “Text Editor” button and paste the following HTML code as the sourcecampbell nov 5
  10. Click OK
  11. Save and close the web resource window
  12. On the web resource lookup window, your newly created HTML file should be select. Click Add
  13. Enter a name and a label
    campbell nov 6
  14. Click the “Formatting” tab and enter the following values:
    • Layout: One Column
    • Number of Rows: 1
    • Automatically expand to use available space: Uncheck — Note: This option often creates unnecessary white space
    • Scrolling: Never — Note: From a user experience perspective, a user should not have to scroll for a field’s label
    • Display Border: Uncheck
  15. Click OK
  16. If necessary, drag the web resource next to the field – see below
    campbell nov 11
  17. Save and publish the change to the account form
  18. Navigating back to an account record, your form should now look similar to the screenshot belowcampbell nov 8

In the screenshot, you will notice the text in the web resource is too large for the allotted space and the text is cut off. The following script will dynamically resize the HTML web resource so the full text is displayed – simply add the code to the HEAD tag in your HTML, save, and publish.

campbell nov 9

After the JavaScript code has been added, the full text will be displayed. Also, when the browser is resized, the height of the web resource will adjust accordingly. Please note, the provided script has been developed for Microsoft Dynamics CRM 2013. Also, since this is manipulating the HTML DOM, it is not a Microsoft supported customization. If you would like a script for the Microsoft Dynamics CRM 2011, please feel free to post the request in the comments section below.

campbell nov 10

If you are looking for a partner to support Microsoft Dynamics CRM, RSM is a national partner with the Gold Customer Relationship Management (CRM) Competency in the Microsoft Partner Network.  This competency recognizes RSM for the completing the requirements for deploying solutions built on Microsoft Dynamics CRM.  If you’d like more information on how we can help you, contact our professionals at crm@mcgladrey.com or by phone at 855.437.7202.

By: Steve Campbell – Microsoft Dynamics CRM partner in New Jersey

Receive Posts by Email

Subscribe and receive notifications of new posts by email.