I need to modify the Activities Listview which is in Cases Subpanels but I don't know how? To be more specific I need to Insert new colums and It isn't posible to do through the Studio...
I need to modify the Activities Listview which is in Cases Subpanels but I don't know how? To be more specific I need to Insert new colums and It isn't posible to do through the Studio...
Hi, Mars
You have to edit the files
modules/Calls/metadata/subpanels/forActivities.php
modules/Meetings/metadata/subpanels/forActivities.php
modules/Tasks/metadata/subpanels/forActivities.php
modules/Emails/metadata/subpanels/forActivities.php
modules/Notes/metadata/subpanels/forActivities.php
Inside all of them you have to create a new field.
Cheers
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
Hi Andope,
The field I want to insert was created by me only in Tasks, not in Meetings or Calls....could you explain me how to create the field in the files.... I think may be like this...
'TIPO_C' =>array (
'vname' => 'Tipo',
'width' => '10%',
),
Thanks a lot
Hi, Mars.Originally Posted by Mars
Are you Brazilian or Portuguese?
That is right!
you have to create this entry into Tasks forHistory.php subpanel defs.
And for other modules displayed into History you have to do the following:
CheersPHP Code:'TIPO_C' =>array (
'force_exists'=>true
'usage'=>'query_only',
),
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
Hi Andopes...I'm from Uruguay... I tried what you told me yesterday but it didn't work perfectly.... I attach you an image...Only apear the header of the colum but no data..
Thanks for your help
Hi all,
We are having a very similar issue but have taken it one step further. So, we have made it so that the custom field that we want to display in the Activities and History sub-panels appears as a column however the data in that field is not visible.
For example: in the activities sub-panel we have tasks appearing. In those tasks, we track billed hours. We would like to display those hours in the newly visible column hours however the values that are visible in the edit or detail view of tasks is not showing up in the activity sub-panel.
I have attached a photo in case I was not clear in my explanation.
![]()
Thanks for your assistance,
--
Dave Geller
Business Analyst
CRM Division of DTIS
City & County of San Francisco
Hello.
Have you solved this problem, guys?
How to display a value within that new column?
Originally Posted by Mars
Hi, Mars.
In Tasks you have to define this field into subpanel, but for other modules you have to add the attribute
CheersPHP Code:'TIPO_C' =>array (
'force_exists'=>true
'usage'=>'query_only',
),
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
Hi,
I was able to get the custom field data to display a while back, but we decided not to use the Cases module to do the work. Here's what I did:
In Task's ForActivities, modules\Tasks\metadata\subpanels\ForActivities, turn on the 'fill_in_additional_fields' flag, this is usually located under the 'where' clause, just add it if you don't see it.
In the same file, add additional flags to your custom field. For examplePHP Code:'fill_in_additional_fields' => true,
Now, code modification is needed in include\ListView\ListView.php inside function process_dynamic_listview_rows() within the while(list($aVal, $aItem) = each($data)) statement after line 350.PHP Code:'custom_field_c' => array(
'name' => 'custom_field_c',
'vname' => 'Custom',
'width' => '10%',
'fill_in_custom_data' => true, // turn this to false if you do not wish to display the data anymore
'custom_data_table' => 'tasks_cstm', // table in which your custom field data is stored in
'sortable'=>false,
),
PHP Code:/*** Start of custom code for custom field data ***/
if($thepanel->panel_definition['fill_in_additional_fields'])
{
foreach($thepanel->panel_definition['list_fields'] as $list_fields)
{ //fill_in_custom_data is a custom array attributein modules/$module_name/metadata/subpanels/ForActivities.php
if($list_fields['fill_in_custom_data'])
{ //construct custom query to query off the cstm table.
$custom_query = 'SELECT '.$list_fields['name'].' FROM '.$thepanel->table_name.' table1,'.$list_fields['custom_data_table'].' table2 WHERE ';
$custom_query .= 'table1.id="'.$fields['ID'].'" AND table2.id_c = "'.$fields['ID'].'";';
$result = $GLOBALS['db']->query($custom_query);
$result1 = current($GLOBALS['db']->fetchByAssoc($result));
$fields[strtoupper($list_fields['name'])] = sprintf("%.2f", $result1 ); //format output
}
}
}
Hope this helps
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks