如何使用sugarcrm实现逻辑钩子?

问题描述

我想实现一个糖逻辑钩子,该钩子会在发票状态验证后触发。

这是我的逻辑钩子

<?php
    $hook_version = 1; 
    $hook_array = Array(); 
    $hook_array['after_save'] = Array(); 
    $hook_array['after_save'][] = Array(1,'status invoices Changes','/var/www/html/suitecrm/modules/AOS_Invoices/AOS_LogicHooks.php','AOS_LogicHooks','statusInvoicesChanges'); 
?>`

这是我的动作课:

<?php
    class AOS_LogicHooks {

        public function statusInvoicesChanges (SugarBean $bean,$event,$arguments) {
            if ($dictionary['AOS_Invoices']['fields']['status']='validated') { 
                $GLOBALS['log']->fatal("Status has been changed");
            }
        }
    }
?>

我想念什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)