RSS

Tag Archives: Dynamics CRM Tooltip

Adding Tool Tips To Fields

Introduction

Tool tips can be added to the fields of the CRM form. It can be a static or dynamic tool tip.

Implementation

To implement this logic, we need Jquery.1.4.4.min.js file. You can get from here .

Create a  javascript web resource and add following functions in it.

function GetToolTips() {
    //Select Name Of Fields Whose ToolTips Is Recquird
    var fieldName1 = "telephone1";
    var fieldName2 = "telephone2";
    var fieldName3 = "fax";

    //Create Text To Be Shown In Respected Fields
    var textOfFieldName1 = "Tool Tip One";
    var textOfFieldName2 = "Tool Tip Two";
    var textOfFieldName3 = "Tolo Tip Three";

    //Calling Method To set Text On That Label Of Selected Field
    RegisterTips(fieldName1, textOfFieldName1);
    RegisterTips(fieldName2, textOfFieldName2);
    RegisterTips(fieldName3, textOfFieldName3);
}

function RegisterTips(fieldName, textOfField) {
    var obj = document.getElementById(fieldName + '_c').children[0];

    // construct tooltip text according to attribute name
    html = '</pre>
<div id="tooltip_' + fieldName + '" style="visibility: hidden; position: absolute;">: ' + textOfField + '</div>
<pre>
';

    $(obj).append(html); // append tooltip text with label
}

Add  jquery.1.4.4.min.js file as web resource.

In the “account” form property, add  both the Web Resources.

In the Onload event of  the account form call the GetToolTips() function and see the tool tip will be reflected when the mouse points to that fields as shown below.

Capture capture2

Hope it helps you……

By Ranjan Parhi
Senior Software Engineer @Team DynamicsCRM.
Mindfire Solutions

 
 

Tags: , , , , , , , , , , , , , , , , ,

 
%d bloggers like this: