2016-08-24 14 views
3

SugarCRM 7.7でフィルタを作成しようとしています。私は顧客管理モジュールで働いています。sugarcrm filter orderbyフィールド

私の新しいfilternameは「次のレビュー日」です。 enter image description here

私は私の の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, 
    ), 
), 

)内のファイルを作成しています。

next_review_dateのフィールドで注文したいのですが、ASCの順番で、日付フィールドです。

誰かが私を助けることができますか?どうすればいいですか?このリンクで

答えて

1


http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.5/UI_Model/Views/Filters/index.html

フィルタでソートする方法はありません。 しかし、私はあなたのフィルタを使用し、そこにデフォルトのフィルタを適用する考えがあります。

custom/modules/module_name/clients/base/views/list/list.php 

'orderBy' => 
     array (
      'field' => 'nextreviewdate', 
      'direction' => 'ASC', 
     ), 

では、これはソートorder.Iのみ、この解決策を見つけ、デフォルトを設定します。
これはあなたを助けるかもしれないと思います。

関連する問題