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:
- 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]
- 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.
Steps to add an HTML Web Resource:
- On the account form, click the ellipsis and click the “Form” option
- Find the “Tax-Exempt” field on the form editor
- Double click on the field
- In the “Field Properties” pop-up, uncheck “Display label on the form”
- Click OK
- In the “Field Properties” window, on the Insert tab click “Web Resource”
- In the web resource lookup, click the New button
- Enter a name for the resource and select “Webpage (HTML)” as the type
- Click the “Text Editor” button and paste the following HTML code as the source
- Click OK
- Save and close the web resource window
- On the web resource lookup window, your newly created HTML file should be select. Click Add
- Enter a name and a label
- 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
- Click OK
- If necessary, drag the web resource next to the field – see below
- Save and publish the change to the account form
- Navigating back to an account record, your form should now look similar to the screenshot below
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.
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.
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