Hello,
I would like to overwrite the method aCase::set_notification_body() in a safe upgrade way.
To do that, I have created the following class in custom/modules/Cases/Cases_assigmnent.php
PHP Code:
require_once('modules/Cases/Case.php');
class Case_assignment extends aCase {
function Case_assignment() {
parent::aCase();
}
function set_notification_body($xtpl, $case)
{
die("custom");
}
}
I call this class in custom/modules/Cases/controller.php
PHP Code:
class CasesController extends SugarController {
function action_editview() {
require_once('custom/modules/Cases/Case_assignment.php');
$this->bean = new Case_assignment();//to use the overwritten method set_notification_body
$this->view = 'edit';
$GLOBALS['view'] = $this->view;
}
}
This doesn't work. The original methiod aCase::set_notification_body is still called.
The issue is that I don't know in which view is called the method set_notification_body() so I don't know in which action I am supposed to call my class.
Any help please ?
Thanks a lot
Bookmarks