How to hide create button subpanel sugarcrm

By | January 18, 2012

Do you want to hide a create button in a subpanel of a module in sugarcrm? Well, if you are then here is some help for you. This worked on sugarcrm community edition 6.3 beta. Follow the steps below at your own risk, make sure to back up your files before making any changes to avoid disaster.

Let’s say you have a module called MOD-A and you want to edit the subpanel of MOD-B that can be seen in MOD-A. Now, just go to, custom/Extension/modules/MOD-A/Ext/Layoutdefs.

Locate the file that defines the subpanel definition for “MOD-B”. It is a .php file, once you locate the file, then you should look for the following line.

‘widget_class’ => ‘SubPanelTopButtonQuickCreate’,

Now, we are about to edit this file. Make sure to take a backup before we edit. Once you find it, then remove the total array associated with it. You might have to remove the following code, and update the rest of the array.

0 =>
array (
‘widget_class’ => ‘SubPanelTopButtonQuickCreate’,
),

Once done, go to Admin -> Repair -> Quick Repair and Rebuild.

Now, go to MOD-A and select one of the listed fields in the module and check out the “create” button for MOD-B sub panel and it should be gone.

Source

If you like this article, then please consider sharing it. Sharing really inspires us to do things much better!!

Leave a Reply

Your email address will not be published. Required fields are marked *