开发者

In SugarCRM, transferring account ownership to another user doesn't update contact ownership

I am using SugarCRM v6.x and have discovered that when transferring account ownership to a new sales rep (the assigned_user_id field) the contacts and other related child records do not get transferred as well.

  1. Is thi开发者_JAVA百科s an actual design choice by the SugarCRM authors, and if so, what is the reason behind it?

  2. Is there a recommended method of transferring accounts that will transfer ownership of related child records as well?


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜