AnsweredAssumed Answered

Using a custom filter in a custom view

Question asked by Steven Cox on Oct 18, 2018
Latest reply on Oct 22, 2018 by Eugene Bychkov



I'm following the custom meeting view in: 


Which has a filterDef as:


        this.collection.filterDef = {date_modified: {$dateRange: 'last_7_days',},};


However, I have an existing filter in the sugar instance which I want to refer to. That filter is defined in PHP in the client/base/view/filter/basic/filterScheduled.php file. It's quite complex and uses PHP functions, it's referred to as:



  $viewdefs['Meetings']['base']['filter']['basic']['filters'][] = array(

    'id' => 'filterMeetingByStatus',


    'filter_definition' => array(




How can I set this in the custom JS view? I'm hoping there's a way I can refer to it by the name 'filterMeetingByStatus'


I can select that filter from the filter list dropdown but I want to disable all filters with 


  isFilterEnabled: false,

So that this filter is always on.