问题:跟踪字段数据源的最佳方法是什么?
我一直在浏览大量文件,而且我能找到的所有参考文献都是正确的。
问题是“姓氏”字段显示的是联系人全名。
任何想法都将不胜感激。
我正在使用SugarCRM CE 6.5.13
感谢。
答案 0 :(得分:1)
详细视图:
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;
}