3

我正在使用 SugarCRM v6.x 并发现在将帐户所有权转移给新的销售代表(assigned_user_id 字段)时,联系人和其他相关子记录也不会被转移。

  1. 这是 SugarCRM 作者的实际设计选择吗?如果是,其背后的原因是什么?

  2. 是否有推荐的转移帐户的方法来转移相关子记录的所有权?

4

1 回答 1

5

I would make it using logic hooks.

  • Create a logic_hooks.php in custom/modules/myModule/

    <?
    $hook_array = Array(); 
    $hook_array['after_save'] = Array(); 
    $hook_array['after_save'][] = Array(0, 'myName', 'custom/modules/myModule/logic_hooks/file.php','myClass', 'myMethod');   
    ?>
    
  • Create file.php in /custom/modules/myModule/logic_hooks/

    <?php
    class myClass{
        function myMethod(&$bean, $event, $arguments){
            // Do something with $bean (like load related contacts and update their assigned user
        }
    }
    ?>
    

For more info see Business Logic Hooks (SugarCRM 6.1 Developer Guide).

于 2011-01-31T13:32:51.570 回答