I am attempting to create a subpanel for Quotes under Accounts. I was able to create this subpanel however, it is not displaying a title nor is it displaying a correct relationship between each-other.
1.) How can I fix the subpanel to display the Quotes title correctly?
2.) How can I fix the subpanel to display only account related quotes?
layoutdefs.ext.php
PHP Code:'quotes' => array(
'order' => 120,
'module' => 'Quotes',
'subpanel_name' => 'default',
'get_subpanel_data' => 'quotes',
'title_key' => 'LBL_QUOTES_SUBPANEL_TITLE',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopCreateButton'),
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
),
),
vardefs.php
PHP Code:'quotes' =>
array (
'name' => 'quotes',
'type' => 'link',
'relationship' => 'account_quotes',
'source' => 'non-db',
'vname' => 'LBL_QUOTES',
),
PHP Code:'account_quotes' => array(
'lhs_module'=> 'Accounts',
'lhs_table'=> 'accounts',
'lhs_key' => 'id',
'rhs_module'=> 'Quotes',
'rhs_table'=> 'quotes',
'rhs_key' => 'accountid',
'relationship_type'=>'one-to-many'
),
Sincerely,
Rustin Phares
* displays subpanel with blank title; displays subpanel with all quotes, not directly related to specific account being viewed


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks