I want to remove activities ,history and products subpanel in this image below i am not able to remove in admin panel how can i do this please help thanks.
This looks like suite7
Thereâs a subpanel file in the moduleâs directory
If youâre looking at a Contact what you want to do is copy the subpaneldefs.php
file to the custom folder
i.e
cp /var/www/html/suitecrm/public/modules/Contacts/metadata/subpaneldefs.php /var/www/html/suitecrm/public/custom/modules/Contacts/metadata/
Edit the file within the custom folder
nano /var/www/html/suitecrm/public/custom/modules/Contacts/metadata/subpaneldefs.php
Comment out the Activities, History and Products sections
Take a look at my subpaneldefs file and you can see where iâve started and ended comments
subpaneldefs.zip (2.8 KB)
Itâs the same logic for any of your modules - copy the subpaneldefs from the respective module (Cases, Contacts, Documents etc) to the custom folder and then edit the custom folderâs file for your changes.
Hello,
I am trying to hide a subpanel from the Accounts module. I checked my subpaneldef.php under the Accounts module but I donât have that particular subpanel.
I could see in the studio account and another module has one-to-many relationship.
Whatâs wrong? Is there any other way?
Step 1: Create a custom File
Go to:
/custom/Extension/modules/Accounts/Ext/Layoutdefs
And create a custom.php file in the directory
Step 2: Add the following lines
<?php unset($layout_defs['Accounts']['subpanel_setup']['leads']); unset($layout_defs['Accounts']['subpanel_setup']['accounts']); unset($layout_defs['Accounts']['subpanel_setup']['products_services_purchased']); ?>
This will remove the âleadsâ, the âmember ofâŚâ and the âproducts and servicesâ subpanels.
Step 3: Run âRepair and Rebuildâ
- which is in AdminâRepair
Hello,
It is not working for me. I tried below code. Also, I did QR&R.
<?php unset($layout_defs['Accounts']['subpanel_setup']['Project']);
Still I could see Projects in the Accountâs subpanel.
The module isnât âProjectsâ itâs âProjectâ (I think)
I tried the below code(custom.php) and did QR&R. Still, I could see Project as a subpanel.
<?php unset($layout_defs['Accounts']['subpanel_setup']['Project']); ?>
Whatâs wrong here?
âProjectâ should be lowercase âprojectâ
Okay! I will try that. How to find exact module names in the CRM? I need to hide other subpanels too in different modules.
I just noticed weird thing. I tried it with the âprojectâ and it got hide from the subpanel. But, when I am trying same thing with the custom module, it is not getting hide.
Maybe I am not writing a correct name.
I am trying the below thing.
<?php unset($layout_defs['Accounts']['subpanel_setup']['CustomeModuleName']); ?>
It definately works for custom modules. Itâs key to get the name correct. Generally itâs then name of module folder in lowercase.
It can also be the name of the relationship like: accounts_custommodulename
Got it thank you!
I have new problem, now I donât see any subpanels in the Accounts, even after QR&R.
Do I have to repair anything else too?
I found the issue! It was error in the code, now I could see all the subpanels.