sugarcrm过滤orderby字段
问题描述:
我想在SugarCRM 7.7中创建一个过滤器。我正在一个客户模块中工作。sugarcrm过滤orderby字段
我创建了我 的src /模块/ mynewfiltermodule /客户/基/过滤器/ nextreviewdate/nextreviewsate.php
$viewdefs[$module_name]['base']['filter']['nextreviewdate'] = array(
'create' => false,
'filters' => array(
array(
'id' => 'nextreviewdate',
'name' => 'LBL_NEXT_REVIEW_DATE_ONLY_FILTER',
'filter_definition' => array(
array(
'next_review_date' => 'orderby ASC',
),
),
'editable' => false,
),
),
)内的文件;
我想按照ASC顺序在next_review_date中的字段排序,它是一个日期字段。
有人可以帮助我。我该怎么做?
答
在这个环节没有过滤器的排序方式。 但我有一个想法,你使用你的过滤器,并在那里应用默认过滤器。
in
custom/modules/module_name/clients/base/views/list/list.php
'orderBy' =>
array (
'field' => 'nextreviewdate',
'direction' => 'ASC',
),
这将设置默认的排序顺序。我只找到了这个解决方案。
我认为这可能对你有帮助。