Hi, all
I've created a custom module (AccountSLAs), and would like it to be displayed in the Account detail view subpanel. I've followed the instructions listed at http://www.sugarcrm.com/wiki/index.php?title=Subpanels to no avail.
It is a subpanel for a module with one-to-many relationships with account and my modules/Accounts/vardefs.php has been amended with the following extra lines in the field array:
'accountslas' => array (
'name' => 'accountslas',
'type' => 'link',
'relationship' => 'account_accountslas',
'module'=>'AccountSLAs',
'bean_name'=>'AccountSLA',
'source'=>'non-db',
'vname'=>'LBL_ACCOUNTSLAS',
),
and the relationships array in the same file:
,'account_accountslas' => array('lhs_module'=> 'Accounts', 'lhs_table'=> 'accounts', 'lhs_key' => 'id',
'rhs_module'=> 'AccountSLAs', 'rhs_table'=> 'accountslas', 'rhs_key' => 'account',
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
'relationship_role_column_value'=>'Accounts')
modules/Accounts/layout_defs.php has these new lines:
'accountslas' => array(
'order' => 120,
'module' => 'AccountSLAs',
'subpanel_name' => 'default',
'get_subpanel_data' => 'accountslas',
'add_subpanel_data' => 'id',
'title_key' => 'LBL_ACCOUNTSLAS_SUBPANEL_TITLE',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
),
),
Am using SugarOS 4.5.1b, and have 'repaired relationships' in admin to no avail. Any ideas out there?


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks