复制领域同一个模块在另一个领域 - suitecrm

问题描述 投票:0回答:1

当创建一个新的纪录我试图值从涉及领域复制到我的自定义模块的名称字段。要做到这一点,我使用以下logic_hook:

<?php
// Do not store anything in this file that is not part of the array or the hook version. This file will
// be automatically rebuilt in the future.
$hook_version = 1;
$hook_array = Array();
// position, file, function
$hook_array['before_save'] = Array(); 
$hook_array['before_save'][] = Array(1, 'Value from one field to another', 'custom/modules/chan_channelpartner/textcopy.php', 'textcopy','textcopy');

?>

这里是我textcopy.php文件:

<?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    class textcopy
    {
        function textcopy($bean, $event, $arguments)
        {
            $bean->name = $bean->namenew_c;
        }
}  

?>

当运行这个文件,我的浏览器返回一个白色屏幕下面的文字:

name = $bean->namenew_c; } } ?>
php sugarcrm suitecrm
1个回答
0
投票

检查你的Apache / PHP日志是否存在错误。东西应该弹出那里。

© www.soinside.com 2019 - 2024. All rights reserved.