Results 1 to 9 of 9

Thread: Modify Cases ListView

  1. #1
    Mars is offline Member
    Join Date
    May 2008
    Posts
    6

    Default Modify Cases ListView

    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...

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Modify Cases ListView

    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.

  3. #3
    Mars is offline Member
    Join Date
    May 2008
    Posts
    6

    Default Re: Modify Cases ListView

    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

  4. #4
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Modify Cases ListView

    Quote Originally Posted by Mars
    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.

    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:

    PHP Code:
     'TIPO_C' =>array (
                
    'force_exists'=>true
                
    'usage'=>'query_only',
            ), 
    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.

  5. #5
    Mars is offline Member
    Join Date
    May 2008
    Posts
    6

    Default Re: Modify Cases ListView

    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
    Attached Images Attached Images  

  6. #6
    ccsfdave is offline Member
    Join Date
    Jul 2008
    Location
    San Francisco
    Posts
    6

    Default Re: Modify Cases ListView

    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

  7. #7
    boogiewoogie is offline Member
    Join Date
    Mar 2008
    Posts
    5

    Default Re: Modify Cases ListView

    Hello.

    Have you solved this problem, guys?
    How to display a value within that new column?

  8. #8
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Modify Cases ListView

    Quote Originally Posted by Mars
    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.

    In Tasks you have to define this field into subpanel, but for other modules you have to add the attribute

    PHP Code:
     'TIPO_C' =>array (
                
    'force_exists'=>true
                
    'usage'=>'query_only',
            ), 
    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.

  9. #9
    sugarhenry is offline Junior Member
    Join Date
    Aug 2008
    Posts
    4

    Default Re: Modify Cases ListView

    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.

    PHP Code:
    'fill_in_additional_fields'    => true
    In the same file, add additional flags to your custom field. For example

    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,
                    ), 
    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:
     /*** 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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Same record multible times in Listview
    By jones70 in forum Help
    Replies: 5
    Last Post: 2011-01-28, 04:47 AM
  2. how to modify data before displaying it in listview
    By lion in forum Developer Help
    Replies: 3
    Last Post: 2008-03-12, 07:22 PM
  3. Unable to modify listview??? 451g
    By dogfuel in forum Developer Help
    Replies: 1
    Last Post: 2007-11-25, 02:00 PM
  4. Sugar/Mambo - portal cases invisible in Sugar
    By mshallop in forum Web Self Service Portal
    Replies: 5
    Last Post: 2007-02-14, 03:10 PM
  5. SugarCrm 4.0 Patch
    By mgamboa in forum General Discussion
    Replies: 0
    Last Post: 2005-12-21, 04:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •