Hello,
I have a problem with logic hooks in a custom module. They’re not firing if I use the extension framework, but they
work if I put them in ‘custom/modules/logic_hooks.php’. I did run ‘Quick Repair and Rebuild’.
Help would be greatly appreciated.
I am using SuiteCRM 7.9.1.
I have put this code in custom/Extension/modules/SHACC_SH_Accounts/Ext/LogicHooks/init_hooks.php
<?php
if(empty($hook_array)){
$hook_array = Array();
}
if(empty($hook_array['after_save'])) {
$hook_array['after_save'] = Array();
}
$hook_array['after_save'][] = Array(1, 'Test', 'custom/modules/SHACC_SH_Accounts/SH_Accounts_Hooks.php','SH_Accounts_Hooks', 'hook_method');
And I have this code in custom/modules/SHACC_SH_Accounts/SH_Accounts_Hooks.php, but it doesnt get executed.
<?php
if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class SH_Accounts_Hooks
{
function hook_method($bean, $event, $arguments)
{
// logic
}
}