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
  • Hello Jason,

         I have achieved this  but not in an upgrade safe manner. Until you get an upgrade safe to achieve this, you can follow below instructions.

         In following path:

              modules/Accounts/metadata/subpaneldefs.php

         Comment the code written for Contact module.

    e.g.

                'contacts' => array(

                    'order' => 30,

                    'module' => 'Contacts',

                    'sort_order' => 'asc',

                    'sort_by' => 'last_name, first_name',

                    'subpanel_name' => 'ForAccounts',

                    'get_subpanel_data' => 'contacts',

                    'add_subpanel_data' => 'contact_id',

                    'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',

                    'top_buttons' => array(

                        array('widget_class' => 'SubPanelTopCreateAccountNameButton'),

                        array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')

                    ),

                ),

        And then do a quick repair and rebuilt. Let me know if you still have the problem.

        *Always remember to take backup of directory or CRM before doing any kind of changes in core file

Reply
  • Hello Jason,

         I have achieved this  but not in an upgrade safe manner. Until you get an upgrade safe to achieve this, you can follow below instructions.

         In following path:

              modules/Accounts/metadata/subpaneldefs.php

         Comment the code written for Contact module.

    e.g.

                'contacts' => array(

                    'order' => 30,

                    'module' => 'Contacts',

                    'sort_order' => 'asc',

                    'sort_by' => 'last_name, first_name',

                    'subpanel_name' => 'ForAccounts',

                    'get_subpanel_data' => 'contacts',

                    'add_subpanel_data' => 'contact_id',

                    'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',

                    'top_buttons' => array(

                        array('widget_class' => 'SubPanelTopCreateAccountNameButton'),

                        array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')

                    ),

                ),

        And then do a quick repair and rebuilt. Let me know if you still have the problem.

        *Always remember to take backup of directory or CRM before doing any kind of changes in core file

Children
No Data