字段引用了错误的数据
Field is referencing the wrong data
问题:跟踪字段数据源的最佳方式是什么?
我查阅了很多文件,我能找到的所有参考资料都是正确的。
问题是 "Last Name" 字段显示的是联系人全名。
如有任何想法,我们将不胜感激。
我正在使用 SugarCRM CE 6.5.13
谢谢。
- 字段在 modules/SomeModules/vardefs.php 中定义,或者如果它是
custom_field 在数据库中 table fields_meta_data
- 在模块 bean modules/SomeModules/SomeModule.php 中,您可以覆盖默认行为以生成例如这样的 full_name:
详情查看:
function fill_in_additional_detail_fields() {
parent::fill_in_additional_detail_fields();
$this->full_name = 'Something else';
}
对于列表视图:
function fill_in_additional_list_fields() {
parent::fill_in_additional_list_fields();
$this->full_name = 'Something else';
}
或者覆盖标准函数 _create_proper_name_field:
/**
* This function helps generate the name and full_name member field
* variables from the salutation, title, first_name and last_name fields.
* It takes into account the locale format settings as well as ACL settings
* if supported.
*/
public function _create_proper_name_field() {
parent::_create_proper_name_field();
$full_name = trim(trim($this->first_name) . ' ' . trim($this->last_name));
if (!empty($full_name) && !empty($this->name)) {
$full_name .= ' - ';
}
if (!empty($this->name)) {
$full_name .= $this->name;
}
$this->full_name = $full_name;
}
问题:跟踪字段数据源的最佳方式是什么?
我查阅了很多文件,我能找到的所有参考资料都是正确的。
问题是 "Last Name" 字段显示的是联系人全名。
如有任何想法,我们将不胜感激。
我正在使用 SugarCRM CE 6.5.13
谢谢。
- 字段在 modules/SomeModules/vardefs.php 中定义,或者如果它是 custom_field 在数据库中 table fields_meta_data
- 在模块 bean modules/SomeModules/SomeModule.php 中,您可以覆盖默认行为以生成例如这样的 full_name:
详情查看:
function fill_in_additional_detail_fields() {
parent::fill_in_additional_detail_fields();
$this->full_name = 'Something else';
}
对于列表视图:
function fill_in_additional_list_fields() {
parent::fill_in_additional_list_fields();
$this->full_name = 'Something else';
}
或者覆盖标准函数 _create_proper_name_field:
/**
* This function helps generate the name and full_name member field
* variables from the salutation, title, first_name and last_name fields.
* It takes into account the locale format settings as well as ACL settings
* if supported.
*/
public function _create_proper_name_field() {
parent::_create_proper_name_field();
$full_name = trim(trim($this->first_name) . ' ' . trim($this->last_name));
if (!empty($full_name) && !empty($this->name)) {
$full_name .= ' - ';
}
if (!empty($this->name)) {
$full_name .= $this->name;
}
$this->full_name = $full_name;
}