How to modify Listview of a subpanel?

I can modify Listview of modules by changing the code in include\ListView\ListViewData. If I wanted any column data to show in red color I can do that by changing code of above file. Now, can we do something like it with the subpanel data? I have made a subpanel and want to make phone call column of the subpanel clickable. How can i do it? 

Parents
  • Which Sugar version do you use? Which edition?

    You never should modify any core files, like files in the include/... directory, if possible.

    Each such customization should be done in the custom/... directory to creatze upgrade safe customizations.

    The phone numbers are stored in phone fields, so if you look in the definition of these phone fields (e.g. in include/SugarFields/Fields/ (6.x) or clients/base/fields/ (7.x)) you are at the right placeto start with some customizations.
    On the other side there is a so called "SkypeOut®-Integration" option which can be set in admin - system settings which creates a callto:-reference on phone numbers (which is accepted by some other cti integrations too). This feature creates a callto:-reference every time a phone number starts with + or 00 or 011.

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH

  • Offshore Evolution Yes, I am trying process_record. But process_record do not get fired in detail view and subpanels are in detail view. According to docs, process_record Executes when the record is being processed as a part of the ListView or subpanel list. I did not understand what docs meant as part of subpanel list. If it fires on subpanel list then it must fire in the detail view where subpanels are. How can i use process_record to access the subpanel data. Help needed.

  • HiTalha Anwar,

    If I wanted any column data to show in red color I can do that by changing code of above file. Now, can we do something like it with the subpanel data?

    Which module have you need?  You have to need this column red color, in this module right process_record logic hook.

    custom/modules/<Module Name>/logic_hook.php

    $hook_array['process_record'] = Array(); 
    $hook_array['process_record'][] = Array(107, 'Display Column Color change in Listview', 'custom/modules/<Module Name>/process_logic_hook.php','OEPL_ClsProcess', 'fn_process');

    custom/modules/<Module Name>/process_logic_hook.php

    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    class OEPL_ClsProcess {

        function fn_process(&$bean, $event, $arguments){
            global $sugar_config;
           
            $bean->change_color_field_name = '<font style="color:red">'.$bean->change_color_field_name.'</font>';
        }
       
    }
    ?>

    Hope helpful

    Regards,

    Dipesh

    Offshore Evolution Pvt Ltd

Reply
  • HiTalha Anwar,

    If I wanted any column data to show in red color I can do that by changing code of above file. Now, can we do something like it with the subpanel data?

    Which module have you need?  You have to need this column red color, in this module right process_record logic hook.

    custom/modules/<Module Name>/logic_hook.php

    $hook_array['process_record'] = Array(); 
    $hook_array['process_record'][] = Array(107, 'Display Column Color change in Listview', 'custom/modules/<Module Name>/process_logic_hook.php','OEPL_ClsProcess', 'fn_process');

    custom/modules/<Module Name>/process_logic_hook.php

    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    class OEPL_ClsProcess {

        function fn_process(&$bean, $event, $arguments){
            global $sugar_config;
           
            $bean->change_color_field_name = '<font style="color:red">'.$bean->change_color_field_name.'</font>';
        }
       
    }
    ?>

    Hope helpful

    Regards,

    Dipesh

    Offshore Evolution Pvt Ltd

Children
No Data