AnsweredAssumed Answered

How to add a custom field column to the History subpanel.

Question asked by benino benino on Mar 12, 2014
Latest reply on Jun 11, 2015 by Jeff C
I would have liked to post this as a reply to the following thread:
http://forums.sugarcrm.com/f6/history-subpanel-custom-field-data-missing-51446/
as there is a solution for this exact problem posted there, however it didn't work for me. 

Here is what I did to try to get a custom field I added to the Notes module to show up in the History subpanel.

I think I may be making some incorrect assumptions.
I have a custom field (prima_note_type_c) added to the Notes module that I want to show in the History subpanel.

/custom/modules/Notes/metadata/subpanel/ForHistory.php

The above file didn’t exist and neither did the subpanel directory. I created both.
The complete contents of the file is as follows:

$subpanel_layout['list_fields']['prima_note_type_c'] => array(
‘force_blank’ => true,
‘force_exists’ => true,
‘vname’ => ‘Note Type’,
‘force_default’ => ‘(SELECT prima_note_type_c FROM notes_cstm WHERE notes_cstm.id_c=notes.id) AS’,
);

I created the subpanel directory and ForHistory.php files for the Calls, Meetings, Tasks, and Emails directories. For these, ForHistory.php contains only the following:

$subpanel_layout['list_fields']['prima_note_type_c'] =>array(
‘usage’=>’query_only’,
‘force_exists’=>true
);

I did a rebuild and nothing happened. No new column in my subpanel. Am I missing anything?


Outcomes