Tuesday, February 22, 2011

Using JQuery in CRM 2011

JQuery is not supported in CRM 2011. Some of the updates using Jquery does not work, but it can be used in displaying data like hiding tabs/sections/fields. JQuery reduces amount of JScript lines required to do the same functionality. I am using jquery-1.4.3.min.js file as a webresource.

Here is a simple example to hide a tab in CRM form


function ToggleTab(tabName , HideStatustrueOrfalse )
{
Xrm.Page.ui.tabs.get(tabName).setVisible(HideStatustrueOrfalse);
}

Add webresource into your form and form onload event mention function name and pass parameters like 'YourTabName', 'false' to hide the desired tab. On similar note you can hide the sections, fields on the CRM form.

-Guru

No comments:

Post a Comment