Hi!
i need some help.
I tryed to customize the subpanel listview of contacts to sort the field, account_name.
I added the sortable=>true and it works, but it's not sorting rigth. I guess it's sorting by id. what to do? any ideas?
Hi!
i need some help.
I tryed to customize the subpanel listview of contacts to sort the field, account_name.
I added the sortable=>true and it works, but it's not sorting rigth. I guess it's sorting by id. what to do? any ideas?
In my listviewdefs I have the followingOriginally Posted by kinshibuya
'ACCOUNT_NAME' =>
array (
'width' => '34%',
'label' => 'LBL_LIST_ACCOUNT_NAME',
'module' => 'Accounts',
'id' => 'ACCOUNT_ID',
'link' => true,
'contextMenu' =>
array (
'objectType' => 'sugarAccount',
'metaData' =>
array (
'return_module' => 'Contacts',
'return_action' => 'ListView',
'module' => 'Accounts',
'parent_id' => '{$ACCOUNT_ID}',
'parent_name' => '{$ACCOUNT_NAME}',
'account_id' => '{$ACCOUNT_ID}',
'account_name' => '{$ACCOUNT_NAME}',
),
),
'default' => true,
'sortable' => true,
'ACLTag' => 'ACCOUNT',
'related_fields' =>
array (
0 => 'account_id',
),
),
It works
Mike Solomon
Development Manager
Ivy Ltd
www.ivy.ltd.uk]www.ivy.ltd.uk
php version 5.2.6
MySql 5.1.59
I guess mine is Exacly the same
But i'm tryuing to sort the columns on the contacts subpanel, how is your /sugarcrm/modules/Contacts/metadata/subpanels/default.php?Code:'ACCOUNT_NAME' => array( 'width' => '34%', 'label' => 'LBL_LIST_ACCOUNT_NAME', 'module' => 'Accounts', 'id' => 'ACCOUNT_ID', 'link' => true, 'contextMenu' => array('objectType' => 'sugarAccount', 'metaData' => array('return_module' => 'Contacts', 'return_action' => 'ListView', 'module' => 'Accounts', 'return_action' => 'ListView', 'parent_id' => '{$ACCOUNT_ID}', 'parent_name' => '{$ACCOUNT_NAME}', 'account_id' => '{$ACCOUNT_ID}', 'account_name' => '{$ACCOUNT_NAME}'), ), 'default' => true, 'sortable'=> true, 'ACLTag' => 'ACCOUNT', 'related_fields' => array('account_id')),
My is like this:
Code:'account_name'=>array( 'module' => 'Accounts', 'target_record_key' => 'account_id', 'target_module' => 'Accounts', 'widget_class' => 'SubPanelDetailViewLink', 'vname' => 'LBL_LIST_ACCOUNT_NAME', 'sortable'=>true, 'width' => '22%', ),
Sorry I misunderstood
Mike Solomon
Development Manager
Ivy Ltd
www.ivy.ltd.uk]www.ivy.ltd.uk
php version 5.2.6
MySql 5.1.59
In my cases subpanelI have this and it works
'account_name'=>array(
'vname' => 'LBL_LIST_ACCOUNT_NAME',
'widget_class' => 'SubPanelDetailViewLink',
'module' => 'Accounts',
'width' => '31%',
'target_record_key' => 'account_id',
'target_module' => 'Accounts',
),
Mike Solomon
Development Manager
Ivy Ltd
www.ivy.ltd.uk]www.ivy.ltd.uk
php version 5.2.6
MySql 5.1.59
ok. I'm trying to sort the field: account_name on the contact's subpanel.
but it's sorting it wrong,
I attached the image to the post.
What code do you have in the subpanel?
Mike Solomon
Development Manager
Ivy Ltd
www.ivy.ltd.uk]www.ivy.ltd.uk
php version 5.2.6
MySql 5.1.59
'account_name'=>array(
'module' => 'Accounts',
'target_record_key' => 'account_id',
'target_module' => 'Accounts',
'widget_class' => 'SubPanelDetailViewLink',
'vname' => 'LBL_LIST_ACCOUNT_NAME',
'sortable'=>true,
'width' => '22%',
),
strange - it works for me in cases
what happens if you remove the 'sortable'=>true,?
I don't have that but it sorts properly
Mike Solomon
Development Manager
Ivy Ltd
www.ivy.ltd.uk]www.ivy.ltd.uk
php version 5.2.6
MySql 5.1.59
Nothing happens, it doesn't change anything
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks