Hiding Panels in System Screens in Sage CRM

Screens like the Opportunity Summary, Case Summary and Company Summary page are divided into different panels. Much of the page layout in the current version is controlled by HTML Tables.

CSS styles are used to format the display of the tables and their TD tags. In these summary pages the different panels are separated by TD that have the class 'ROWGap'.

We can take advantage of the this fact to allow us to control the page by either adding or removing panels.

I discussed adding a panel in the article "Adding a new Panel to a Summary screen e.g. Company Summary".

The same trick can be used to find panels to hide them.

For example you may want to hide the Opportunity Total panel in the Opportunity Summary Screen.

In the sample code below I have mixed Sage CRM Client Side code with Plain Old Javascript.

I have used the crm.ready() method to make sure that the code will load and run in all supported browsers as the page loads and I have used the crm.getTrans() method to make sure that the code hides the panel whatever the users language.

[code language="javascript"]

//get the current cells parent's parent and remove the child
//this removes the "RowGap" row
strTargetTD = arrTDs[i].parentNode;
strTargetParent = strTargetTD.parentNode;
strTargetParent.removeChild(strTargetTD);

//get the current cells once the 'RowGap' has gone and delete the panel.
strTargetTD = arrTDs[i].parentNode;
strTargetParent = strTargetTD.parentNode;
strTargetParent.removeChild(strTargetTD);

}
}
}

})

[/code]

Anonymous
Parents Comment Children
No Data