【发布时间】:2016-12-09 14:49:08
【问题描述】:
我正在使用套件 crm 7.7.5
当我创建机会并从相关字段中选择帐户时,我希望字段(国家/地区)自动填充所选帐户所在国家/地区的值。
为此,我尝试添加代码
$dictionary['Opportunity']['fields']['country_c']['populate_list']= array('id','name','country_c');
$dictionary['Opportunity']['fields']['country_c']['field_list'] = array('account_id_c','account_name','country_c');
在文件 \custom\Extension\modules\Opportunities\Ext\Vardefs\sugarfield_country_c.php 中
知道 country_c 是表 accounts 中的列 country 的名称,第二个 country_c 是布局机会中字段 country 的 id
但这不起作用,有人可以帮我找出原因吗?
PS:我已经尝试按照本教程进行操作https://developer.sugarcrm.com/2011/08/31/howto-using-a-relate-field-to-populate-a-custom-field/
【问题讨论】:
-
看起来这个链接中的人说它不适用于标准模块,所以这可以解释它:developer.sugarcrm.com/2012/06/20/…
-
这篇文章是关于快速搜索的,我正在寻找自动填充字段,在机会的编辑视图中,在弹出窗口中选择帐户名称后