Create the function ‘create_new_list_query’ in module with next code. You can add SQL code to parameter ‘WHERE’.
public function create_new_list_query(
$order_by,
$where,
$filter = array(),
$params = array(),
$show_deleted = 0,
$join_type = '',
$return_array = false,
$parentbean = null,
$singleSelect = false,
$ifListForExport = false
)
{
if ($_REQUEST['action']==='quicksearchQuery' || $_REQUEST['action']==='Popup' )
{
$where .= ' AND (' . <your_SQL_code_for_filter_records> . ')';
}
return parent::create_new_list_query(
$order_by,
$where,
$filter,
$params,
$show_deleted,
$join_type,
$return_array,
$parentbean,
$singleSelect,
$ifListForExport
);
}
It works like a fixed filter. You can create dynamic filter also but it’s a little harder. You should write javascript for ‘quicksearch’ and php code for ‘popup’.