Hide Contacts subpanel in Accounts module

Hi,

I want to hide Contacts Subpanel in Account module. i tried to add the following code under:

@custom\Extension\modules\Accounts\Ext\Layoutdefs\layoutdefs.ext.php

and also tried,

@custom\Extension\modules\Accounts\Ext\Layoutdefs\_overrideAccount_subpanel_accounts_contacts.php

The code:

unset($layout_defs['Accounts']['subpanel_setup']['accounts_contacts']);

But both location are not working to hide the contact subpanel.

Parents
  • Hi Jason,,

    this is upgradesafe coding..

    Subpanel layouts are defined originally within metadata, e.g. /modules/Accounts/metadata/subpaneldefs.php.

    These files hold the original, default layout of subpanels and the fields within them. They are overridden in custom Extension data, e.g. custom/Extension/modules/Accounts/Ext/Layoutdefs/accounts_cont.php.

    After a repair & rebuild, you’ll find the data from the arbitrarily named files are merged and placed in /custom/modules/Accounts/Ext/Layoutdefs/layoutdefs.ext.php.

    <?php

    unset($layout_defs["Accounts"]["subpanel_setup"]['contacts']);

  • Hi Sohan & Mehul,

    The solutions are not working for me, but I found the solution: $layout_defs['Accounts']['subpanel_setup'][contacts] = array ();

    Thanks anyway!!

Reply Children