Tank you for your time!
The developmen server ara now SugarCRM Version 6.5.2 (Build 8410).
The case are to add custom categories to the History and Activities sub panels for Accounts and change date to start, sent and so on. The modules with custom categories are Meetings and Tasks.
When the customer implemented Tasks categories via studio the “date_start” suddenly was stored in “tasks_custm.start_c” .
( "tasks_cstm" structure = id_c, kategori_c, huskategori_c, vu_c, start_c, slut_c, medarbetare_c )
The following code fixed the date_start OK, but I could not get any data to the categories array.
From “custom/modules/Tasks/metadata/subpanels/ForHistory_mb.php”
Code:
'date_start'=>array(
'force_blank' => true,
'force_exists' => true,
'force_default' => '(SELECT start_c FROM tasks_cstm WHERE tasks_cstm.id_c=tasks.id) AS',
'vname' => 'LBL_LIST_DATE',
'width' => '10%',
),
'categories' => array (
'force_blank' => true,
'force_exists' => true,
'force_default' => '(SELECT kategori_c FROM tasks_cstm WHERE tasks_cstm.id_c=tasks.id) AS',
'vname' => 'LBL_LIST_KATEGORI',
'width' => '15%',
), And from “custom/modules/Meetings/metadata/subpanels/ForHistory_mb.php”
Code:
'categories' => array (
'force_blank' => true,
'force_exists' => true,
'force_default' => '(SELECT meetingkategori_c FROM meetings_cstm WHERE meetings_cstm.id_c=meetings.id) AS',
'vname' => 'LBL_LIST_KATEGORI',
'width' => '15%',
), ( Table structure for "meetings_cstm" = id_c, meetingkategori_c, contact_id_c, user_id_c )
Some problems was solved when I changed the array names to “meetingkategori_c” and “kategori_c”!
But only one modules custom categories are visible at the same time. I get the Meeting categories if the module are defined first in the array $layout_defs['Accounts']["subpanel_setup"]["history"]["collection_list"]
In file “custom/Extensions/modules/Accounts/Ext/Layoutdefs/History_change.php”
And the same happens for the Activities subpanel.
Attachments: custom files and a log from loading an Account custom_subpanels.zipsugarcrm_log.zip
Best Regars
John
Bookmarks