hi,
I put the following code (*) to custom/modules/Cases/metadate/editviewdefs.php:
array (
'name' => 'account_name',
'label' => 'LBL_ACCOUNT_NAME',
'tabindex' => '2',
'displayParams' =>
array (
'readOnly' => true,
'size'=>60,
'field_to_name_array' => array(
'id' => 'account_id',
'name' => 'account_name',
'source_code_c' => 'source_code_c',
),
'additionalFields' => array(
'source_code_c' => 'source_code_c',
),
),
),
this works well, source_code_c field is updated.
I copied the idea to custom/modules/Contacts/metadata/editviewdefs.php where the original code (**) was this:
array (
'name' => 'account_name',
'label' => 'LBL_ACCOUNT_NAME',
'tabindex' => '3',
'displayParams' =>
array (
'readOnly' => true,
'size' => 60,
'key' => 'billing',
'copy' => 'primary',
'billingKey' => 'primary',
'additionalFields' =>
array (
'phone_office' => 'phone_work',
),
),
),
the new code (***) is:
array (
'name' => 'account_name',
'label' => 'LBL_ACCOUNT_NAME',
'tabindex' => '3',
'displayParams' =>
array (
'readOnly' => true,
'size' => 60,
'key' => 'billing',
'copy' => 'primary',
'billingKey' => 'primary',
'field_to_name_array' =>
array (
'id' => 'account_id',
'name' => 'account_name',
'source_code_c' => 'source_code_c',
),
'additionalFields' =>
array (
'source_code_c' => 'source_code_c',
'phone_office' => 'phone_work',
),
),
),
the source_code_c field update is ignored while address and phone fields work well.
if I cut the original code to this (****):
array (
'name' => 'account_name',
'label' => 'LBL_ACCOUNT_NAME',
'tabindex' => '3',
'displayParams' =>
array (
'readOnly' => true,
'size'=>60,
'field_to_name_array' => array(
'id' => 'account_id',
'name' => 'account_name',
'source_code_c' => 'source_code_c',
),
'additionalFields' => array(
'source_code_c' => 'source_code_c',
),
),
),
source_code_c works well and of course the address and telephone fileds are not updated.
the really strange thing if I cut the phone_office line from code (***) the telephone number is still updated. it seems sugarcrm ignores my custom code in this case and use something else.
what the hell is happening?


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks