i want to replace the "Description" in Related Listview for Timecontrol to "Service"
default array is
Timecontrol Number Title Date Start Time Start Total Time Description Assigned To Action
i want it to be
Timecontrol Number Title Date Start Time Start Total Time Service Assigned To Action
=================
file to edit is modules/Timecontrol/Timecontrol.php
the value to edit is 'Description' => array('crmentity' => 'description'), --> this needs to replace to 'Service Name'=>array('service'=>'servicename'),
and
'Description' => 'description', --> this needs to replace to 'Service Name'=>'servicename',
Find a line which has;
/**
* Mandatory for Listing (Related listview)
*/
public $list_fields = array (
/* Format: Field Label => array(tablename => columnname) */
// tablename should not have prefix 'vtiger_'
'Timecontrol Number' => array('timecontrol' => 'timecontrolnr'),
'Title'=> array('timecontrol' => 'title'),
'Date Start' => array('timecontrol' => 'date_start'),
'Time Start' => array('timecontrol' => 'time_start'),
'Total Time' => array('timecontrol' => 'totaltime'),
'Description' => array('crmentity' => 'description'), --> this needs to replace to 'Service Name'=>array('service'=>'servicename'),
'Assigned To' => array('crmentity' => 'smownerid')
);
public $list_fields_name = array(
/* Format: Field Label => fieldname */
'Timecontrol Number' => 'timecontrolnr',
'Title'=> 'title',
'Date Start' => 'date_start',
'Time Start' => 'time_start',
'Total Time' => 'totaltime',
'Description' => 'description', --> this needs to replace to 'Service Name'=>'servicename',
'Assigned To' => 'assigned_user_id'
);
Use product_id, unless you want to access some field inside the service module
with product_id it is easy, it will "just work", if you want to access information in the service module you have to modify the query to join on the service table with the variable related_tables
(08-22-2019, 02:58 AM)global.da Wrote: hi rslemer,
i want to replace the "Description" in Related Listview for Timecontrol to "Service"
default array is
Timecontrol Number Title Date Start Time Start Total Time Description Assigned To Action
i want it to be
Timecontrol Number Title Date Start Time Start Total Time Service Assigned To Action
=================
file to edit is modules/Timecontrol/Timecontrol.php
the value to edit is 'Description' => array('crmentity' => 'description'), --> this needs to replace to 'Service Name'=>array('service'=>'servicename'),
and
'Description' => 'description', --> this needs to replace to 'Service Name'=>'servicename',
Find a line which has;
/**
* Mandatory for Listing (Related listview)
*/
public $list_fields = array (
/* Format: Field Label => array(tablename => columnname) */
// tablename should not have prefix 'vtiger_'
'Timecontrol Number' => array('timecontrol' => 'timecontrolnr'),
'Title'=> array('timecontrol' => 'title'),
'Date Start' => array('timecontrol' => 'date_start'),
'Time Start' => array('timecontrol' => 'time_start'),
'Total Time' => array('timecontrol' => 'totaltime'),
'Description' => array('crmentity' => 'description'), --> this needs to replace to 'Service Name'=>array('service'=>'servicename'),
'Assigned To' => array('crmentity' => 'smownerid')
);
public $list_fields_name = array(
/* Format: Field Label => fieldname */
'Timecontrol Number' => 'timecontrolnr',
'Title'=> 'title',
'Date Start' => 'date_start',
'Time Start' => 'time_start',
'Total Time' => 'totaltime',
'Description' => 'description', --> this needs to replace to 'Service Name'=>'servicename',
'Assigned To' => 'assigned_user_id'
);
==================
is this all?
or do i have to edit HelpDesk.php as well?
cheers
Dennis
coreBOS 8.0
Hi
Normally I don't change directly in code ( hardcode ) because this causes a incompatible with the standard code, principaly when needs upgraded to a new version
Look Joe's comment
But if you can maintain a original code, is better for you, trust me ...
Timecontrol, not Timecontrol_ListColumns: originname is the name of the module
HelpDesk, not Helpdesk
You only need linkfield if the native linkfield isn't in your list and, obviously the new link field you choose MUST be in the list of columns.