Hi. I’m trying to create a button inside Calls module (detail view). The button will have to change the status of the current call (in detail view) and create a new Call with some fields populated from the other Call. There’s a similar functionality which is Close and New but I we need other status and not all the fields. I’ve looked inside the detailviewdefs to check the close and new button but found nothing useful there. Any ideas on how to approach this?
Should I go with a custom controller, extending edit view and adding a button to editviewdefs?
Any help/ideas will be much appreciated
Hi, you must make link http://your_crm/index.php?module=Calls&action=EditView&field_name=data_field
From current Call in detail view you can collected data from smarty var.
Your button in detailviewdefs.php see
‘buttons’ =>
array(
0 => ‘EDIT’,
1 => ‘DUPLICATE’,
2 => ‘DELETE’,
…
‘Custom_button’ =>
array(
‘customCode’ => ‘<a class=“button” href=“index.php?module=Calls&action=EditView&name={$fields.name.value}” {$MOD.LBL_CUSTOM_BUTTON}">’,
),