Hi,
Hopefully someone out there can figure out what is wrong. I've been banging my head trying to get these pain in the neck relate fields working. While the Wiki entry is good there always something else!
To make a long story short, finally figured out that the module builder really stinks it up with the relate fields. That took about 4 hours to figure out. Once I deleted the module and the destroyed the relate field, redeployed the module and used studio to add a relate field finally was moving forward.
I finally have the relationship working. I can select the Account from my custom module relate field.Finally got the subpanel to at least show on the Account page. That took lots of troubleshooting. Finally found the missing ' and several naming problems.
Now I'm stuck because the subpanel is missing defined fields from the layoutdefs and subpanel definitions. I continue to get various errors (widget error for top button, incorrectly displayed headers, missing listed fields), Finally got the buttons to appear but they just give errors when clicked on. Such as select does not pup-up the Kids to select, Create doesn't create. So something is still wrong.
Hope someone can figure it out. Below is the critical code. I was hoping to fully deploy on a production system today. This my last major piece of version 1.1 of customized Sugar 5.0b
Server specs: CentOS 5, Sugar 5.0b, php 5.2.?, MSSQL 5
Thanks for your assistance,
Paris
BTW, I tried to follow the Wiki and developer docs as much as possible. But with only partial success.
I also posted this over on the developers forum. Hoping Clint or Superman or some of the other experts can help me out! I'm open to suggestions! :>
====================
custom/Extension/modules/Accounts/Ext/Layoutdefs/layoutdefs.php
$layout_defs['Accounts']['subpanel_setup']['ch123_kids'] = array (
'order' => 99,
'module' => 'ch123_Kids',
'subpanel_name' => 'ForAccount',
'refresh_page' => 1,
'get_subpanel_data' => 'client_c',
'title_key' => 'LBL_KIDS_SUB',
);
************ client_c is the relate field in the Kids module. When I had the widget_class statements in here as directed in the Wiki. I kept getting widget error and no buttons in the subpanel.
crm5/modules/ch123_Kids/metadata/subpanels/ForAccount.php
<?php
$module_name='ch123_Kids';
$subpanel_layout = array (
'top_buttons' =>
array (
0 =>
array (
'widget_class' => 'SubPanelTopCreateButton',
),
1 =>
array (
'widget_class' => 'SubPanelTopSelectButton',
'popup_module' => 'ch123_Kids',
),
),
'where' => '',
'list_fields' =>
array (
'first_name' =>
array (
'name' => 'first_name',
'vname' => 'LBL_FIRST_NAME',
'usage' => 'query_only',
),
'last_name' =>
array (
'name' => 'last_name',
'vname' => 'LBL_LAST_NAME',
'usage' => 'query_only',
),
'email1' =>
array (
'name' => 'email1',
'vname' => 'LBL_LIST_EMAIL',
'widget_class' => 'SubPanelEmailLink',
'width' => '30',
),
'phone_work' =>
array (
'name' => 'phone_work',
'vname' => 'LBL_LIST_PHONE',
'width' => '15',
),
'edit_button' =>
array (
'widget_class' => 'SubPanelEditButton',
'module' => 'ch123_Kids',
'width' => '5',
),
'remove_button' =>
array (
'widget_class' => 'SubPanelRemoveButton',
'module' => 'ch123_Kids',
'width' => '5',
),
),
);
?>
***********At one time there was a client_c in the list. Deleted that allong the way.
********** Attached is what I'm getting on the screen![]()


LinkBack URL
About LinkBacks
Finally got the subpanel to at least show on the Account page. That took lots of troubleshooting. Finally found the missing ' and several naming problems.




Reply With Quote

Bookmarks