在 SugarCRM 中,将帐户所有权转让给其他用户不会更新联系人所有权 [英] In SugarCRM, transferring account ownership to another user doesn't update contact ownership

查看:30
本文介绍了在 SugarCRM 中,将帐户所有权转让给其他用户不会更新联系人所有权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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. 这是 SugarCRM 作者的实际设计选择吗?如果是,其背后的原因是什么?

  1. Is this an actual design choice by the SugarCRM authors, and if so, what is the reason behind it?

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

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.

  • 在 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');   
?>

  • 在/custom/modules/myModule/logic_hooks/

  • 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
        }
    }
    ?>
    

  • 有关详细信息,请参阅 业务逻辑挂钩(SugarCRM 6.1 开发人员指南).

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

    这篇关于在 SugarCRM 中,将帐户所有权转让给其他用户不会更新联系人所有权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆