I want to achieve such a function,for customize module,It just need to relate note,but activities
how should I do?
thanks
I want to achieve such a function,for customize module,It just need to relate note,but activities
how should I do?
thanks
I love sugar
I have done this:
vardefs.php,add
$dictionary['pack_module1'] = array(
'table'=>'pack_module1',
'audited'=>true,
'fields'=>array (
'notes' =>
array (
'name' => 'notes',
'type' => 'link',
'relationship' => 'pack_module1_notes',
'source' => 'non-db',
'vname' => 'LBL_NOTES',
),
), 'relationships'=>array (
'pack_module1_notes' =>
array (
'lhs_module' => 'pack_module1',
'lhs_table' => 'pack_module1',
'lhs_key' => 'id',
'rhs_module' => 'Notes',
'rhs_table' => 'notes',
'rhs_key' => 'parent_id',
'relationship_type' => 'one-to-many',
'relationship_role_column' => 'parent_type',
'relationship_role_column_value' => 'pack_module1',
),
),
'optimistic_lock'=>true,
);
require_once('include/SugarObjects/VardefManager.php');
VardefManager::createVardef('pack_module1','pack_m odule1', array('basic','assignable'));
add subpaneldefs.php and add follows content
$layout_defs['pack_module1'] = array(
// list of what Subpanels to show in the DetailView
'subpanel_setup' => array(
'notes' => array(
'order' => 40,
'module' => 'Notes',
'subpanel_name' => 'Note',
'get_subpanel_data' => 'notes',
//'add_subpanel_data' => 'bug_id',
'title_key' => 'LBL_BUGS_SUBPANEL_TITLE',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
array('widget_class' => 'SubPanelTopSelectButton'),
),
),
),
);
but,it does not show subpanel,such as attachment
I love sugar
now,subpanel has show,when I click create button,jumping to note editview.when click save button,there is a error,but,content has been saved actually
I love sugar
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks