Search

Hide show and select tabs in CRM 4.0

How to hide, show and select tabs in CRM 4.0 If you already worked with Microsoft Dyamics CRM 4.0, you know that almost everything you do with JavaScript is considered a "hack" because you manipulate the DOM of the pages by yourself. Because of this I decided to give you some help with differents helper methods I developped at my day job. I'm currently working on a big development project involving CRM.

Hide a tab in CRM 4.0

 
/* Jscript: Hide a tab in CRM 4.0 */




function HideTab(tabNumber)
{
var tab = document.getElementById("tab" + (tabNumber - 1).toString() + "Tab");
tab.style.display = "none";
}

Show a tab in CRM 4.0

 
/* Jscript: Show a tab in CRM 4.0 */
function ShowTab(tabNumber)
{
var tab = document.getElementById("tab" + (tabNumber - 1).toString() + "Tab");
tab.style.display = "";
}

Select a tab in CRM 4.0

 
/* Jscript: Select a tab in CRM 4.0 */
function SelectTab(tabNumber)
{
var tab = document.getElementById("tab" + (tabNumber - 1).toString() + "Tab");
tab.click();
}