I hope all of you are doing well. I have Register Handler(Before Save and After Save) used this script.we have run this script in Modules/CustomExtension/CustomExtension.php. Handler register are working fine and create Handler table also perfect.
static function register_eventhandler()
{
global $adb;
$moduleInstance = Vtiger_Module::getInstance('Modules Name');
//Here HCacf Custom Extension Name
//Before Save
Vtiger_Event::register($moduleInstance,'vtiger.entity.beforesave',
'HCacfHandler','modules/HCacf/HCacfHandler.php');
// After Save
Vtiger_Event::register($moduleInstance,'vtiger.entity.aftersave',
'HCacfHandler','modules/HCacf/HCacfHandler.php');
You would have to do a query for that. something like this should work:
In this case we should assume that
handler_pathis unique in thevtiger_eventhandlerstable, which in practice, is not:But you could add further conditions to your WHERE clause as you see necessary