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
  • I tried with the below condition, however it also hides the fields during creation time also.

    if (crm.fields("comp_createdby").val() != CurrentUser.user_userid)

    {

    $("#StandardForm tr:gt(6)").hide();

    }

  • Thanks Jeff. However, I want to show this detail for the logged-in user, in case he is the creator of the Company entry.

  • Hi Jeff,

    I want to hide the below sections in Company Summary screen:

    a) Address

    b) Phone/E-Mail

    c) Contact

    I tried with the above code, but it is not working in this case.

    Any help would be much appreciated.

  • Jeff:

    Does this method actually "remove" the panel or just "hide" it. Based on the title of the post, it appears to just "hide" it. Is it possible to actually remove it?

    We have a client that is using Sage CRM for two distinctly different areas of their business and they are using the user's primary territory to control this. The Opportunity Detail Screen has all the fields related to one of these territories and none of the fields will be used for the other territory, except the description. Therefore, we want to remove the details panel depending on the territory.

    We have an issue when we are converting from a Lead to an Opportunity. I have been able to successfully "hide" the details panel (Although it appears to flash briefly on the screen). However, whenever we try to hit "save" when converting from the Lead to Opportunity, we get a validation errors message.

    If a field has been marked as required at the field level, we have made sure it is addressed on the WebPicker.

    Is the system still addressing required fields at the screen level for fields that are on the detail screen even thought it has been hidden?

    If so, is it possible to actually remove the panel rather than just hide it?

    Any assistance you can provide will be greatly appreciated. Thanks!