./custom/modules/Users/metadata/2. Create a new file with the following name:
popupdefs.php3. Copy and paste the below code into this file:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');This code is modified from the stock file found here:
/*********************************************************************************
* By installing or using this file, you are confirming on behalf of the entity
* subscribed to the SugarCRM Inc. product ("Company") that Company is bound by
* the SugarCRM Inc. Master Subscription Agreement (“MSA”), which is viewable at:
* http://www.sugarcrm.com/master-subscription-agreement
*
* If Company is not bound by the MSA, then by installing or using this file
* you are agreeing unconditionally that Company will be bound by the MSA and
* certifying that you have authority to bind Company accordingly.
*
* Copyright (C) 2004-2014 SugarCRM Inc. All rights reserved.
********************************************************************************/
$popupMeta = array(
'moduleMain' => 'User',
'varName' => 'USER',
'orderBy' => 'user_name',
'whereClauses' => array(
'first_name' => 'users.first_name',
'last_name' => 'users.last_name',
'user_name' => 'users.user_name',
'is_group' => 'users.is_group',
),
'whereStatement'=> "users.status != 'Reserved' AND users.portal_only= '0'",
'searchInputs' => array(
'first_name',
'last_name',
'user_name',
'is_group',
), );
./modules/Users/metadata/popupdefs.phpWithin that file, the 'whereStatement' is "users.status = 'Actvie' AND users.portal_only= '0'", The modification above will return both Active and Inactive Users, but not Reserved type Users (the SNIP Email Archiving User).
Hi Dan,
I've tried to implement this approach on Sugar 7.5 without success. After digging a bit more i've found this clause on the jssource file:
.../jssource/src_files/include/javascript/sugar7/plugins/QuickSearchFilter.js
// See MAR-1362 for details.
if (searchModule === 'Users' || searchModule === 'Employees') {
returnFilter[0] = ({
'$and': [
{'status': {'$not_equals': 'Inactive'}},
returnFilter[0]
]
});
}
After commenting this code, the search started to return the inactive users, however:
Hi Dan,
I've tried to implement this approach on Sugar 7.5 without success. After digging a bit more i've found this clause on the jssource file:
.../jssource/src_files/include/javascript/sugar7/plugins/QuickSearchFilter.js
// See MAR-1362 for details.
if (searchModule === 'Users' || searchModule === 'Employees') {
returnFilter[0] = ({
'$and': [
{'status': {'$not_equals': 'Inactive'}},
returnFilter[0]
]
});
}
After commenting this code, the search started to return the inactive users, however: