AnsweredAssumed Answered

Lookup search filter for Specific module

Question asked by Kishor Mali on Dec 6, 2019

Hello All,

I am working on SugarCRM 9.1 Enterprize.

 

I write a lookup search filter on Project module. And set it as default filter.

 

I want to show this for only some modules ex. Meetings, Calls, Tasks.

But it is showing for all lookup.

 

Path: custom\Extension\modules\Project\Ext\clients\base\filters\basic\customProjectFilter.php

 

<?php
$viewdefs['Project']['base']['filter']['basic']['filters'][] = array(
'id' => 'customMeetingProjectFilter',
'name' => 'LBL_PROJECT_SOME_FIELD_FILTER',
'filter_definition' => array(
array(
'some_field' => 1
),
),
'editable' => false,
'is_template' => false,
);

 

To make it default, I write this code.

Path: custom\Extension\modules\Project\Ext\clients\base\filters\default\default.php

 

<?php
$module_name = 'Project';
$viewdefs[$module_name]['base']['filter']['default'] = array(
'default_filter' => 'customMeetingProjectFilter',
'disabled' => true
);

 

I want to show it only for specific modules. Anyone having idea? Help highly appreciated.

Outcomes