Customize tool tips in form label of CRM 2011

To achieve this functionality create an xml file that will hold the tooltip information. The following code illustrates it

  
    
      use for testing
    
  

Now use java script file to call above xml file for tool tips. The jquery library should include in that global java script file. the following code illustrates java script file ——-

function loadTips() {
    $.ajax({
        type: "GET",
        url: "../WebResources/new_testToolTipsXML",
        dataType: "xml",
        success: parseTipsXML
    }); //end ajax
}
function parseTipsXML(data) {

    var entity = Xrm.Page.data.entity.getEntityName().toString().toLowerCase();
    entXML = $("entity[name=" + entity + "]", data)
    $(entXML).children().each(function (i) {
        var attr = this.getAttribute("name");
        var txt = $(this).find('shorttooltip').text();

        registerTips(entity, attr, txt);
    });
}
function registerTips(entity, attr, txt) {
    var obj = document.getElementById(attr+'_c').children[0];
    html = ': ' + txt + '';

    $(obj).append(html);
}

Now add this two files as web resources on  MSCRM. Using java script, parseTipsXML reads the XML file on a successful load.  It selects the entity node that matches the current entity.  For each attribute node in that entity, it gets the name and the shorttooltip text, finds the label for the attribute, and appends the text of the shorttooltip node.  MSCRM apparently somewhere takes any text contained within the containing

of a label, and converts it to a tooltip, so that when hover over the label, the text of the div tag becomes the tooltip. Finally, add the function loadTips() to form’s onLoad event.  If there are any attributes that have been defined for that entity, then the script will pick them up and add them to form.
150 150 Burnignorance | Where Minds Meet And Sparks Fly!