AnsweredAssumed Answered

Customize Subpanel Field using SugarWidgetSubPanelConcat

Question asked by community-support on Jan 13, 2014
Latest reply on Jan 13, 2014 by community-support
I've been trying to make a modification to the Contacts Subpanel display (under Accounts Detail View).
It seems like it would be simple to use one of the many Sugar Widgets found in: include/generic/SugarWidgets/

For starters, I was trying to use an existing Widget: SugarWidgetSubPanelConcat.

So, I modified by subpanel metadata:
custom/modules/Contacts/metadata/subpanels/Account_subpanel_contacts.php

[PHP]
error('Account_subpanel_contacts.php Found!');

// created: 2013-12-17 20:46:34
$subpanel_layout['list_fields'] = array (
   'name' =>
   array (
     'name' => 'name',
     'vname' => 'LBL_LIST_NAME',
     'widget_class' => 'SubPanelDetailViewLink',
     'module' => 'Contacts',
     'width' => '43%',
     'default' => true,
   ),
   'phone_work' =>
   array (
     'vname' => 'LBL_LIST_PHONE',
     'widget_class' => 'SubPanelConcat',
     'source' => array ('', 'phone_work', ''),
     'width' => '15%',
     'default' => true,
   ),
   'email1' =>
   array (
     'name' => 'email1',
     'vname' => 'LBL_LIST_EMAIL',
     'widget_class' => 'SubPanelEmailLink',
     'width' => '30%',
     'sortable' => false,
     'default' => true,
   ),
   'edit_button' =>
   array (
     'vname' => 'LBL_EDIT_BUTTON',
     'widget_class' => 'SubPanelEditButton',
     'module' => 'Contacts',
     'width' => '5%',
     'default' => true,
   ),
   'remove_button' =>
   array (
     'vname' => 'LBL_REMOVE',
     'widget_class' => 'SubPanelRemoveButton',
     'module' => 'Contacts',
     'width' => '5%',
     'default' => true,
   ),
   'first_name' =>
   array (
     'name' => 'first_name',
     'usage' => 'query_only',
   ),
   'last_name' =>
   array (
     'name' => 'last_name',
     'usage' => 'query_only',
   ),
   'salutation' =>
   array (
     'name' => 'salutation',
     'usage' => 'query_only',
   ),
);
[/PHP]

Using error logging, I can verify that the Subpanel file is included using: $GLOBALS['log']->error('Account_subpanel_contacts.php Found!');

Tue Dec 17 22:00:52 2013 [9517][1][ERROR] Account_subpanel_contacts.php Found!

I can also verify that the widget is included: $GLOBALS['log']->error(__METHOD__.' end $value: '.$value);

Tue Dec 17 22:00:52 2013 [9517][1][ERROR] SugarWidgetSubPanelConcat.php Found!

What am I forgetting to do? I just can't figure out why it's not changing to the concatenated link. Perhaps something else is overriding my change? I thought maybe, so I tried this on a fresh SugarCRM 6.5.16 CE. Maybe is has something to do with my CE testing?

Helllllppp,
Jeff Walters

(from jjwdesign)

Outcomes