There are a few sub panels on the contact pages and projects that we are not using.
is it possible to remove them?
I went into the studio and I could change the columns, and remove all the columns but the panel still shows up in there.
There are a few sub panels on the contact pages and projects that we are not using.
is it possible to remove them?
I went into the studio and I could change the columns, and remove all the columns but the panel still shows up in there.
Yes, it is possible to do it.
One way would be to remove access to the module that corresponds with the sub panel in question. That should automatically remove the subpanel from view.
Secondly, you can comment out the corresponding sections of code from within the <sugar>/modules/Project/metadata/subpaneldefs.php. There might be a way to do this in an upgrade safe manner in 5.0, but I am not sure.
If you are on a pre-5.0 release, the second approach would require a code modification, but the file you'd want to modify is <sugar>/modules/Project/layout_defs.php
Regards,
Angel Magaña
Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
Blog: http://cheleguanaco.blogspot.com.
Twitter: @cheleguanaco.
________
| Projects: |_____________________________________
|
| CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
| GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
| CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
| Round Robin Leads Assignment
| Phone Number Formatter
| CaseTwit (Twitter Integration)
______________________________________________
Thank you for your response. I am using version 5.
I have commented out the bugs for the project tab as a test in the subpaneldefs.php file.
I did a search for bugs under the project folder, and I see there are also entries in a vardefs.php file, and also in the language file.PHP Notice: Undefined index: module in C:\[SUGARPATH]\include\SubPanel\SubPanelDefinitions.php on line 86 PHP Notice: Undefined index: subpanel_name in C:\[SUGARPATH]\include\SubPanel\SubPanelDefinitions.php on line 86 PHP Warning: aSubPanel::require(modules//metadata/subpanels/.php) [function.aSubPanel-require]: failed to open stream: No such file or directory in C:\[SUGARPATH]\include\SubPanel\SubPanelDefinitions.php on line 87 PHP Fatal error: aSubPanel::require() [function.require]: Failed opening required 'modules//metadata/subpanels/.php' (include_path='C:\[SUGARPATH]\include/..;.;C:\php5\pear') in C:\[SUGARPATH]\include\SubPanel\SubPanelDefinitions.php on line 87
It looks to me that the array length is stored or cached somewhere. Any thoughts?
I think you inadvertently commented out something you shouldn't have. I don't see the same problem.
I've attached my subpaneldefs.php so you can check it out. Search for my name to see where I edited it.
Regards,
Angel Magaña
Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
Blog: http://cheleguanaco.blogspot.com.
Twitter: @cheleguanaco.
________
| Projects: |_____________________________________
|
| CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
| GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
| CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
| Round Robin Leads Assignment
| Phone Number Formatter
| CaseTwit (Twitter Integration)
______________________________________________
Does anyone know how to do this in 5.0 - upgrade safe.
There is not a file named subpanelsdefs in custom/ working/ modules. It seems to me that this change must be made in custom/working modules to be upgrade safe.
Anyone???
Thanks
Angel, thank you for your replies.
Attached is the section of code with the comment.
If I remove the comments it is fine, as soon as I add them I get the error in my other post. It must be something in the version that I am using? (Version 5.0.0a (Build 3120))Code:'get_subpanel_data' => 'cases', 'add_subpanel_data' => 'case_id', 'title_key' => 'LBL_CASES_SUBPANEL_TITLE', ), /* 'bugs' => array( 'top_buttons' => array( array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Bugs'), ), 'order' => 110, 'module' => 'Bugs', 'sort_order' => 'desc', 'sort_by' => 'bug_number', 'subpanel_name' => 'default', 'get_subpanel_data' => 'bugs', 'add_subpanel_data' => 'bug_id', 'title_key' => 'LBL_BUGS_SUBPANEL_TITLE', ), */ 'products' => array( 'top_buttons' => array( array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Products'), ),
I will try to update to the latest build and see if that works.
Check out the post by André Lopes of Lampada in this thread - they show you how to do this in an upgrade-safe manner.
http://www.sugarcrm.com/forums/showthread.php?t=27893
- Sugar Team
dpa Technology LLC
e-mail: dpaDeveloper@dpatechnology.com
web: http://www.dpatechnology.com
With a clean install of sugar 5.0b it works.
Either it was a bug that was fixed, or reading the other post, it may have been a problem with the user preference.
thanks for your time.
I used this code: on 5.0.
It works great!
Thanks dpatech and André Lopes
<?php
unset($layout_defs['Accounts']['subpanel_setup']['leads']);
?>
The only subpanel I wanted to remove and couldnt do was Direct Reports. Anyone know the code for this:
Thanks very much
Just to clarify, where did you put that code? what file?Originally Posted by johnnyo
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks