Hi broz, thanks for replying, I solved this problem, I was wrong in creating the bean, however I have another problem. I am modifying the “edit” button of the cc_Prodottoo subpanel to show a custom layout.
In “custom \ Extension \ modules \ Cs_Cliente \ Ext \ Layoutdefs \ cs_cliente_cc_prodottoo_1_Cs_Cliente.php” I changed the subpanel_name from “default” to “ForCliente”.
$layout_defs["Cs_Cliente"]["subpanel_setup"]['cs_cliente_cc_prodottoo_1'] = array (
'order' => 100,
'module' => 'cc_Prodottoo',
'subpanel_name' => 'ForCliente',
'sort_order' => 'asc',
'sort_by' => 'id',
'title_key' => 'LBL_CS_CLIENTE_CC_PRODOTTOO_1_FROM_CC_PRODOTTOO_TITLE',
'get_subpanel_data' => 'cs_cliente_cc_prodottoo_1',
'top_buttons' =>
array (
0 =>
array (
'widget_class' => 'SubPanelTopButtonQuickCreate',
),
1 =>
array (
'widget_class' => 'SubPanelTopSelectButton',
'mode' => 'MultiSelect',
),
),
);
I created the “ForCliente.php” file in “custom \ modules \ cc_Prodottoo \ metadata \ subpanels” but this file is not pointed to.
// this is the ForCliente.php file
if (!defined('sugarEntry') || !sugarEntry) {
die('Not A Valid Entry Point');
}
$module_name = 'cc_Prodottoo';
$subpanel_layout = array(
'top_buttons' => array(
array('widget_class' => 'SubPanelTopCreateButton'),
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => $module_name),
),
'where' => '',
'list_fields' => array(
'name' => array(
'vname' => 'LBL_NAME',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '45%',
),
'date_modified' => array(
'vname' => 'LBL_DATE_MODIFIED',
'width' => '45%',
),
'distributore_c' => array (
'vname' => 'LBL_DISTRIBUTORE',
'widget_class' => 'SubPanelShowcst_DistrProdotto',
'width' => '40%',
),
'edit_button' => array(
'vname' => 'LBL_EDIT_BUTTON',
'widget_class' => 'SubPanelEditcst_DistributoreProdottoButton',
'module' => 'cc_Prodottoo',
'width' => '4%',
),
'remove_button' => array(
'vname' => 'LBL_REMOVE',
'widget_class' => 'SubPanelRemoveButton',
'module' => $module_name,
'width' => '5%',
),
),
);