2

カスタムフィールドsugarfield_ast_rec_link_c.phpcustom/Extension/modules/Calls/Ext/Vardefsに次のような内容で作成しました: `

<?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 に表示されません。だから私はそれをビューに置くことはできません。誰でも助けることができますか?

4

1 に答える 1

5

あなたは変わるべきです

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

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

新しいカスタム フィールドを定義するときは、常に Bean 名 (モジュール 1 ではありません!) を $dictionary 配列キーとして使用する必要があることに注意してください。私の意見では、カスタム vardef ですべてが問題ないかどうかを確認する最善の方法は、独自のものと既存のものを比較することですcache/modules/<module_name>/BEAN_NAMEvardefs.php

于 2012-04-10T11:08:01.350 に答える