AnsweredAssumed Answered

Newly implemented logic hook is not running

Question asked by haalvin haalvin on Jun 23, 2014
Latest reply on Jun 25, 2014 by Dhaivat Naik
I need to write some logichook before save ,but I found it doesn't work in Lead module and other module except Account and Opportunity module.
I don't know if there are some code need to be changed in Sugar7?
/////////////////

I wrote the following two files.

custom\modules\Leads\logic_hooks.php
<?php
$hook_version = 1;
$hook_array = Array();
$hook_array['before_save'] = Array();
$hook_array['before_save'][] = Array('1','logic before save','custom/modules/Leads/LeadsLogicHook.php','Leads_hook','before_Leads_hook',);
?>


custom/modules/Leads/LeadsLogicHook.php
<?php
class Leads_hook {
    function before_Leads_hook(&$bean, $event, $arguments=null)    {
        error_log('iii',3,'bbb1.log');
    }
}


Could anyone help?

Outcomes