Thursday, June 3, 2010

Hiding tabs in CRM 4.0

Here's how you hide a tab on a CRM 4.0 form.

Define the function to hide the tab (place in the form's onload event):

/*hide tab*/
crmForm.Neudesic_HideTab = function(tabName) {
document.getElementById(tabName).style.display = "none";
}
Now call the function from the onload event of the form:

if(crmForm.FormType == 1 || crmForm.FormType == 2) {
/*hide tab*/
crmForm.Neudesic_HideTab("tab4Tab");
}
The tabs across the top of the form have the following naming convention: tabXTab where X is the number of the tab (starting with zero). So if you wanted to hide the first tab you would use tab0Tab as the name. If you wanted to hide the second tab you would use tab1Tab, etc.

Have fun...

No comments:

Post a Comment