【问题标题】:Custom field doesn't appear in sugarCRM自定义字段未出现在 SugarCRM 中
【发布时间】:2012-04-10 04:33:55
【问题描述】:

我在 custom/Extension/modules/Calls/Ext/Vardefs 中创建了一个自定义字段 sugarfield_ast_rec_link_c.php,其中包含以下内容: `

<?php
$dictionary['Calls']['fields']['ast_rec_link_c'] = array
('name' => 'ast_rec_link_c',
 'vname' => 'LBL_AST_REC_LINK_C',
 'type' => 'varchar',
 'len' => '255',
 'source' => 'non-db',
 'function' => array('name'=>'getRecordLink',
                     'returns'=>'html',
                     'include'=>'custom/modules/Calls/CustomLogic.php')
);

?>

` 还在 custom/Extension/modules/Calls/Ext/Language 中添加了语言文件。快速修复后,我的自定义字段没有出现在 Studio -> Calls -> Fields 中。所以我不能把它放在视图上。有人可以帮忙吗?

【问题讨论】:

    标签: sugarcrm custom-fields


    【解决方案1】:

    你应该改变

    <?php
    $dictionary['Calls']['fields']['ast_rec_link_c'] = array(...);
    

    <?php
    $dictionary['Call']['fields']['ast_rec_link_c'] = array(...);
    

    请记住,在定义新的自定义字段时,您应该始终使用 bean 名称(不是模块一!)作为 $dictionary 数组键。 在我看来,检查您的自定义 vardefs 是否一切正常的最佳方法是将您自己的 vardefs 与 cache/modules/&lt;module_name&gt;/BEAN_NAMEvardefs.php中现有的进行比较

    【讨论】:

    • 谢谢,但我自己已经意识到了 :) 奇怪的是我只能在列表视图中找到我的自定义字段,但不能在详细视图等中找到。甚至在列表视图中也可以找到该字段尽管函数 getRecordLink 显示为空,它只返回 'ya.ru'
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多