//logic
        }
    }
?>
Creating a Core Logic Hook
Prior to Sugar 6.3.x, logic hooks could only be created using the following method. Please note that this approach is still valid but is not recommended when building plugins as it may conflict with existing customizations.
./custom/modules/<module>/logic_hooks.php
<?php
   $hook_version = 1;
   $hook_array = Array();
   $hook_array['after_delete'] = Array();
   $hook_array['after_delete'][] = Array(
      //Processing index. For sorting the array.
      1,
      //Label. A string value to identify the hook.
      'after_delete example',
      //The PHP file where your class is located.


//The PHP file where your class is located.
      'custom/modules/<module>/after_delete_class.php',
      //The class the method is in.
      'after_delete_class',
      //The method to call.
      'after_delete_method'
   );
?>
./custom/modules/<module>/after_delete_class.php
<?php
   if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
   class after_delete_class
   {
      function after_delete_method($bean, $event, $arguments)
      {
         //logic
      }
   }
?>
  	Last modified: 2023-02-03 21:04:03


before_save
Overview
The before_save logic hook executes before a record is saved.
Definition
function before_save($bean, $event, $arguments){}
Arguments
Name
Type
Description
bean
Object
The bean object
event
String
The current event
arguments
Array
Additional information related to the event
arguments.check_notify
Boolean
Whether or not to send notifications
arguments.isUpdate
Boolean
Whether or not the record is newly created
true = this is an update to an existing record
false = a newly created record
Considerations
For modules that contain a user-friendly record ID (e.g. the case_number field for the Cases module), the value of that field is not available for a before_save call. This is because this business logic has yet to be executed.


Calling save on the bean in this hook will cause an infinite loop if not handled correctly. (i.e: $bean->save())
Examples
Creating a Logic Hook using Extension Framework
./custom/Extension/modules/<module>/Ext/LogicHooks/<file>.php
<?php
    $hook_array['before_save'][] = Array(
        //Processing index. For sorting the array.
        1,
        //Label. A string value to identify the hook.
        'before_save example',
        //The PHP file where your class is located.
        'custom/modules/<module>/before_save_class.php',
        //The class the method is in.
        'before_save_class',
        //The method to call.
        'before_save_method'
    );
?>


'before_save_method'
    );
?>
./custom/modules/<module>/before_save_class.php
<?php
    if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    class before_save_class
    {
        function before_save_method($bean, $event, $arguments)
        {
            //logic
        }
    }
?>
Creating a Core Logic Hook
Prior to Sugar 6.3.x, logic hooks could only be created using the following method. Please note that this approach is still valid but is not recommended when building plugins as it may conflict with existing customizations.
./custom/modules/<module>/logic_hooks.php
<?php
   $hook_version = 1;
   $hook_array = Array();


$hook_version = 1;
   $hook_array = Array();
   $hook_array['before_save'] = Array();
   $hook_array['before_save'][] = Array(
      //Processing index. For sorting the array.
      1,
      //Label. A string value to identify the hook.
      'before_save example',
      //The PHP file where your class is located.
      'custom/modules/<module>/before_save_class.php',
      //The class the method is in.
      'before_save_class',
      //The method to call.
      'before_save_method'
   );
?>
./custom/modules/<module>/before_save_class.php
<?php


./custom/modules/<module>/before_save_class.php
<?php
   if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
   class before_save_class
   {
      function before_save_method($bean, $event, $arguments)
      {
         //logic
      }
   }
?>
  	Last modified: 2023-02-03 21:04:03


after_retrieve
Overview
The after_retrieve hook executes after a record has been retrieved from the database.
Definition
function after_retrieve($bean, $event, $arguments){}
Arguments
Name
Type
Description
bean
Object
The bean object
event
String
The current event
arguments
Array
Additional information related to the event
arguments.id
String
ID of the record
arguments.encode
Boolean
Whether or not to encode
Considerations
The after_retrieve hook does not fire when a new record is being created.
Calling save on the bean in this hook can cause adverse side effects if not handled correctly and should be avoided. (i.e. $bean->save())
Examples
Creating a Logic Hook using the Extension Framework
./custom/Extension/modules/<module>/Ext/LogicHooks/<file>.php
<?php


<?php
    $hook_array['after_retrieve'][] = Array(
        //Processing index. For sorting the array.
        1,
        //Label. A string value to identify the hook.
        'after_retrieve example',
        //The PHP file where your class is located.
        'custom/modules/<module>/after_retrieve_class.php',
        //The class the method is in.
        'after_retrieve_class',
        //The method to call.
        'after_retrieve_method'
    );
?>
./custom/modules/{module}/{module}_hook.php
<?php
    if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    class after_retrieve_class
    {


class after_retrieve_class
    {
        function after_retrieve_method($bean, $event, $arguments)
        {
            //logic
        }
    }
?>
Creating a Core Logic Hook
Prior to Sugar 6.3.x, logic hooks could only be created using the following method. Please note that this approach is still valid but is not recommended when building plugins as it may conflict with existing customizations.
./custom/modules/<module>/logic_hooks.php
<?php
   $hook_version = 1;
   $hook_array = Array();
   $hook_array['after_retrieve'] = Array();
   $hook_array['after_retrieve'][] = Array(
      //Processing index. For sorting the array.
      1,
      //Label. A string value to identify the hook.


1,
      //Label. A string value to identify the hook.
      'after_retrieve example',
      //The PHP file where your class is located.
      'custom/modules/<module>/after_retrieve_class.php',
      //The class the method is in.
      'after_retrieve_class',
      //The method to call.
      'after_retrieve_method'
   );
?>
./custom/modules/<module>/after_retrieve_class.php
<?php
   if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
   class after_retrieve_class
   {
      function after_retrieve_method($bean, $event, $arguments)
      {
         //logic
      }
   }
?>


{
         //logic
      }
   }
?>
  	Last modified: 2023-02-03 21:04:03


after_restore
Overview
The after_restore hook executes after a record gets undeleted (i.e. the deleted field's value changes from 1 to 0).
Definition
function after_restore($bean, $event, $arguments){}
Arguments
Name
Type
Description
bean
Object
The bean object
event
String
The current event
arguments
Array
Additional information related to the event (typically empty)
Examples
Creating a Logic Hook using the Extension Framework
./custom/Extension/modules/<module>/Ext/LogicHooks/<file>.php
<?php
    $hook_array['after_restore'][] = Array(
        //Processing index. For sorting the array.
        1,
        //Label. A string value to identify the hook.
        'after_restore example',


'after_restore example',
        //The PHP file where your class is located.
        'custom/modules/<module>/after_restore_class.php',
        //The class the method is in.
        'after_restore_class',
        //The method to call.
        'after_restore_method'
    );
?>
./custom/modules/<module>/after_restore_class.php
<?php
    if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    class after_restore_class
    {
        function after_restore_method($bean, $event, $arguments)
        {
            //logic
        }
    }
?>
Creating a Core Logic Hook


//logic
        }
    }
?>
Creating a Core Logic Hook
Prior to Sugar 6.3.x, logic hooks could only be created using the following method. Please note that this approach is still valid but is not recommended when building plugins as it may conflict with existing customizations.
./custom/modules/<module>/logic_hooks.php
<?php
   $hook_version = 1;
   $hook_array = Array();
   $hook_array['after_restore'] = Array();
   $hook_array['after_restore'][] = Array(
      //Processing index. For sorting the array.
      1,
      //Label. A string value to identify the hook.
      'after_restore example',
      //The PHP file where your class is located.


//The PHP file where your class is located.
      'custom/modules/<module>/after_restore_class.php',
      //The class the method is in.
      'after_restore_class',
      //The method to call.
      'after_restore_method'
   );
?>
./custom/modules/<module>/after_restore_class.php
<?php
   if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
   class after_restore_class
   {
      function after_restore_method($bean, $event, $arguments)
      {
         //logic
      }
   }
?>
  	Last modified: 2023-02-03 21:04:03


before_relationship_delete
Overview
The before_relationship_delete logic hook executes before a relationship between two records isÂ deleted.
Definition
function before_relationship_delete($bean, $event, $arguments){}
Arguments
Name
Type
Description
bean
Object
The bean object
event
String
The current event
arguments
Array
Additional information related to the event
arguments.id
String
Module id
arguments.module
String
Module name
arguments.related_id
String
Related module id
arguments.related_module
String
Related module name
arguments.link
String
Link field name
arguments.relationship
String
Relationship name
Considerations
This hook will be executed for each side of the relationship. For example, if you delete an association between an account and a contact, the hook will run for both records.


The arguments parameter will have additional information regarding the records being modified. The $bean variable will not contain this information.
Change Log
Version
Note
6.4.5
Added before_relationship_delete hook.
Examples
Creating a Logic Hook using the Extension Framework
./custom/Extension/modules/<module>/Ext/LogicHooks/<file>.php
<?php
    $hook_array['before_relationship_delete'][] = Array(
        //Processing index. For sorting the array.
        1,
        //Label. A string value to identify the hook.
        'before_relationship_delete example',
        //The PHP file where your class is located.
        'custom/modules/<module>/before_relationship_delete_class.php',
        //The class the method is in.
        'before_relationship_delete_class',


'before_relationship_delete_class',
        //The method to call.
        'before_relationship_delete_method'
    );
?>
./custom/modules/<module>/before_relationship_delete_class.php
<?php
    if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    class before_relationship_delete_class
    {
        function before_relationship_delete_method($bean, $event, $arguments)
        {
            //logic
        }
    }
?>
  	Last modified: 2023-02-03 21:04:03


after_fetch_query
Overview
The after_fetch_queryÂ logic hook executes afterÂ a sugar queryÂ has been executed.
Definition
function after_fetch_query($bean, $event, $arguments){}
Arguments
Name
Type
Description
bean
Object
The bean object
event
String
The current event
arguments
Array
Additional information related to the event
arguments.beans
Array
An array of bean objects resulting from the query
arguments.fields
Array
An arrayÂ of selected fields
arguments.rows
Array
An array representation of the selected beansÂ
Change Log
Version
Note
7.7.0.0
Added after_fetch_queryÂ logic hook
Examples
Creating a Logic Hook using Extension Framework


Examples
Creating a Logic Hook using Extension Framework
./custom/Extension/modules/<module>/Ext/LogicHooks/<file>.php
<?php
    $hook_array['after_fetch_query'][] = Array(
        //Processing index. For sorting the array.
        1,
        //Label. A string value to identify the hook.
        'after_fetch_query example',
        //The PHP file where your class is located.
        'custom/modules/<module>/after_fetch_query_class.php',
        //The class the method is in.
        'after_fetch_query_class',
        //The method to call.
        'after_fetch_query_method'
    );
?>
./custom/modules/<module>/after_fetch_query_class.php


./custom/modules/<module>/after_fetch_query_class.php
<?php
    if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
    class after_fetch_query_class
    {
        function after_fetch_query_method($bean, $event, $arguments)
        {
            //logic
        }
    }
?>
Creating a Core Logic Hook
Prior to Sugar 6.3.x, logic hooks could only be created using the following method. Please note that this approach is still valid but is not recommended when building plugins as it may conflict with existing customizations.
./custom/modules/<module>/logic_hooks.php
<?php
   $hook_version = 1;
   $hook_array = Array();


$hook_version = 1;
   $hook_array = Array();
   $hook_array['after_fetch_query'] = Array();
   $hook_array['after_fetch_query'][] = Array(
      //Processing index. For sorting the array.
      1,
      //Label. A string value to identify the hook.
      'after_fetch_query example',
      //The PHP file where your class is located.
      'custom/modules/<module>/after_fetch_query_class.php',
      //The class the method is in.
      'logic_hooks_class',
      //The method to call.
      'after_fetch_query_method'
   );
?>
./custom/modules/<module>/after_fetch_query_class.php


./custom/modules/<module>/after_fetch_query_class.php
<?php
   if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
   class after_fetch_query_class
   {
      function after_fetch_query_method($bean, $event, $arguments)
      {
         //logic
      }
   }
?>
  	Last modified: 2023-02-03 21:04:03


before_fetch_query
Overview
The before_fetch_queryÂ logic hook executesÂ beforeÂ a sugar queryÂ has been executed.
Definition
function before_fetch_query($bean, $event, $arguments){}
Arguments
Name
Type
Description
bean
Object
The bean object
event
String
The current event
arguments
Array
Additional information related to the event
arguments.query
Object
The query to be executed
arguments.fields
Array
An arrayÂ of selected fields
Change Log
Version
Note
7.7.0.0
Added before_fetch_queryÂ logic hook
Examples
Creating a Logic Hook using Extension Framework
./custom/Extension/modules/<module>/Ext/LogicHooks/<file>.php
<?php


<?php
    $hook_array['before_fetch_query'][] = Array(
        //Processing index. For sorting the array.
        1,
        //Label. A string value to identify the hook.
        'before_fetch_query example',
        //The PHP file where your class is located.
        'custom/modules/<module>/before_fetch_query_class.php',
        //The class the method is in.
        'before_fetch_query_class',
        //The method to call.
        'before_fetch_query_method'
    );
?>
./custom/modules/<module>/before_fetch_query_class.php
<?php
    if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');


class before_fetch_query_class
    {
        function before_fetch_query_method($bean, $event, $arguments)
        {
            //logic
        }
    }
?>
Creating a Core Logic Hook
Prior to Sugar 6.3.x, logic hooks could only be created using the following method. Please note that this approach is still valid but is not recommended when building plugins as it may conflict with existing customizations.
./custom/modules/<module>/logic_hooks.php
<?php
   $hook_version = 1;
   $hook_array = Array();
   $hook_array['before_fetch_query'] = Array();
   $hook_array['before_fetch_query'][] = Array(
      //Processing index. For sorting the array.
      1,


//Processing index. For sorting the array.
      1,
      //Label. A string value to identify the hook.
      'before_fetch_query example',
      //The PHP file where your class is located.
      'custom/modules/<module>/before_fetch_query_class.php',
      //The class the method is in.
      'logic_hooks_class',
      //The method to call.
      'before_fetch_query_method'
   );
?>
./custom/modules/<module>/before_fetch_query_class.php
<?php
   if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
   class before_fetch_query_class
   {


class before_fetch_query_class
   {
      function before_fetch_query_method($bean, $event, $arguments)
      {
         //logic
      }
   }
?>
  	Last modified: 2023-02-03 21:04:03


Filters
Overview
Filters are a way to predefine searchesÂ on views that render a list of recordsÂ such as list views, pop-up searches, and lookups.Â This pageÂ explains howÂ to implement the various types of filters for record list views.Â
Filters contain the following properties:
Property
Type
Description
id
String
A unique identifier for the filter
name
StringÂ
The label key for the display labelÂ of the filter
filter_definition
Array
The filter definition to apply to the results
editable
BooleanÂ
Determines whether the user can edit the filter. Note:Â If you are creating a predefined filter for a user, this should be set toÂ false
is_template
Boolean
Used with initial pop-up filters to determine if theÂ filter is available as a template


Used with initial pop-up filters to determine if theÂ filter is available as a template
Note: If a filter contains custom fields, those fields must be search-enabled in Studio > {Module Name} > Layouts > Search.
Operators
Operators, defined in ./clients/base/filters/operators/operators.php, are expressions used by aÂ filter to represent queryÂ operators. They are constructed in theÂ filter_definition to help generate the appropriate query syntax that is sent to the database for a specific field type. Operators can be defined on a global or module level. The accepted paths are listed below:
./clients/base/filters/operators/operators.php
./custom/clients/base/filters/operators/operators.php
./modules/<module>/clients/base/filters/operators.php


./modules/<module>/clients/base/filters/operators.php
./custom/modules/<module>/clients/base/filters/operators.php
The list of stock operators is shown below:
Operator
Label / Key
Description
$contains
is any of / LBL_OPERATOR_CONTAINSUsed by multienum
Matches anything that contains the value.
$empty
is empty / LBL_OPERATOR_EMPTYUsed by enum and tag
Matches on empty values.
$not_contains
is not any of / LBL_OPERATOR_NOT_CONTAINSUsed by multienum
Matches anything that does not contain the specified value.
$not_empty
is not empty / LBL_OPERATOR_NOT_EMPTYUsed by enum and tag
Matches on non-empty values.
$in


Matches on non-empty values.
$in
is any of / LBL_OPERATOR_CONTAINSUsed by enum, int, relate, teamset, and tag
Finds anything where field matches one of the values as specified as an array.
$not_in
is not any of / LBL_OPERATOR_NOT_CONTAINSUsed by enum, relate, teamset, and tag
Finds anything where the field does not match any of the values in the specified array of values.
$equals
exactly matches / LBL_OPERATOR_MATCHESUsed by varchar, name, email, text, and textarea
is equal to / LBL_OPERATOR_EQUALSUsed by currency, int, double, float, decimal, and date
is / LBL_OPERATOR_ISUsed by bool, phone, radioenum, and parent


Performs an exact match on that field.
$starts
starts with / LBL_OPERATOR_STARTS_WITHUsed by varchar, name, email, text, textarea, and phone
is equal to / LBL_OPERATOR_EQUALSUsed by datetime and datetimecombo
Matches on anything that starts with the value.
$not_equals
is not equal to / LBL_OPERATOR_NOT_EQUALSUsed by currency, int, double, float, and decimal
is not / LBL_OPERATOR_IS_NOTUsed by radioenum
Matches on non-matching values.
$gt
is greater than / LBL_OPERATOR_GREATER_THANUsed by currency, int, double, float, and decimal
after / LBL_OPERATOR_AFTERUsed by date
Matches when the field is greater than the value.


Matches when the field is greater than the value.
$lt
is less than / LBL_OPERATOR_LESS_THANUsed by currency, int, double, float, and decimal
before / LBL_OPERATOR_BEFOREUsed by date
Matches when the field is less than the value.
$gte
is greater than or equal to / LBL_OPERATOR_GREATER_THAN_OR_EQUALSUsed by currency, int, double, float, and decimal
after / LBL_OPERATOR_AFTERUsed by datetime and datetimecombo
Matches when the field is greater than or equal to the value
$lte
is less than or equal to / LBL_OPERATOR_LESS_THAN_OR_EQUALSUsed by currency, int, double, float, and decimal


before / LBL_OPERATOR_BEFOREUsed by datetime and datetimecombo
Matches when the field is less than or equal to the value.
$between
is between / LBL_OPERATOR_BETWEENUsed by currency, int, double, float, and decimal
Matches when a numerical value is between two other numerical values.
last_7_days
last 7 days / LBL_OPERATOR_LAST_7_DAYSUsed by date, datetime, and datetimecombo
Matches date in the last 7 days relative to the current date.
next_7_days
next 7 days / LBL_OPERATOR_NEXT_7_DAYSUsed by date, datetime, and datetimecombo
Matches dates in the next 7 days relative to the current date.
last_30_days


last_30_days
last 30 days / LBL_OPERATOR_LAST_30_DAYSUsed by date, datetime, and datetimecombo
Matches dates in the last 30 days relative to the current date.
next_30_days
next 30 days / LBL_OPERATOR_NEXT_30_DAYSUsed by date, datetime, and datetimecombo
Matches dates in the next 30 days relative to the current date.
last_month
last month / LBL_OPERATOR_LAST_MONTHUsed by date, datetime, and datetimecombo
Matches dates in the previous month relative to the current month.
this_month
this month / LBL_OPERATOR_THIS_MONTHUsed by date, datetime, and datetimecombo
Matches dates in the current month.
next_month


Matches dates in the current month.
next_month
next month / LBL_OPERATOR_NEXT_MONTHUsed by date, datetime, and datetimecombo
Matches dates in the next month relative to the current month.
last_year
last year / LBL_OPERATOR_LAST_YEARUsed by date, datetime, and datetimecombo
Matches dates in the last year relative to the current year.
this_year
this year / LBL_OPERATOR_THIS_YEARUsed by date, datetime, and datetimecombo
Matches dates in the current year.
next_year
next year / LBL_OPERATOR_NEXT_YEARUsed by date, datetime, and datetimecombo
Matches dates in the next year relative to the current year.
$dateBetween


Matches dates in the next year relative to the current year.
$dateBetween
is between / LBL_OPERATOR_BETWEENUsed by date, datetime, and datetimecombo
Matches dates between two given dates.
yesterday
yesterday / LBL_OPERATOR_YESTERDAYUsed by date, datetime, and datetimecombo
Matches dates on yesterday relative to the current date.
today
today / LBL_OPERATOR_TODAYUsed by date, datetime, and datetimecombo
Matches dates in the current date.
tomorrow
tomorrow / LBL_OPERATOR_TOMORROWUsed by date, datetime, and datetimecombo
Matches dates on tomorrow relative to the current date.
Example


Matches dates on tomorrow relative to the current date.
Example
The example below defines a filter where the type field must contain the value Customer and the nameÂ field must start with the letterÂ A.
$filters = array(
    array(
        'type' => array(
            '$in' => array(
                'Customer',
            ),
        ),
    ),
    array(
        'name' => array(
            '$starts' => 'A',
        ),
    ),
);
Sub-Expressions
Sub-expressions group filter expressions into groupings. By default, all expressions are bound by an $andÂ expression grouping.Â
Sub-Expression
Description
$and
Joins the filters in an "and" expression
$or
Joins the filters in an "or" expression


$or
Joins the filters in an "or" expression
Note: Sub-Expressions are only applicable to predefined filters and cannot be used for initial filters.Â
The example below defines a filter where the name field must begin with the lettersÂ A or C.
$filters = array(
    '$or' => array (
        array(
            'name' => array(
                '$starts' => 'A',
            ),
        ),
        array(
            'name' => array(
                '$starts' => 'C',
            ),
        ),
    )
);
Module Expressions
Module expressionsÂ operate on modules instead of specific fields. The current module can be specified by either using the module name _this or by leaving the module name as a blank string.
Module Expression
Description
$favorite


Module Expression
Description
$favorite
Filters the records by the current users favorited items.
$owner
Filters the records by the assigned user.
The example below defines a filter where records must be favorited items.
$filters = array(
    array(
        '$favorite' => '_this'
    ),
);
Filter Examples
Adding Predefined Filters to the List View Filter List
To add a predefined filter to the module's list view, create a new filter definition extension, which will append the filter to the module's viewdefs.
The following example will demonstrate how to add a predefined filter on the Accounts module to return all records with an account type of "Customer" and industry of "Other".


To create a predefined filter, create a display label extension in Â ./custom/Extension/modules/<module>/Ext/Language/. For this example, we will create:
./custom/Extension/modules/Accounts/Ext/Language/en_us.filterAccountByTypeAndIndustry.php
<?php
$mod_strings['LBL_FILTER_ACCOUNT_BY_TYPE_AND_INDUSTRY'] = 'Customer/Other Accounts';
Next, create aÂ custom filter extension in Â ./custom/Extension/modules/<module>/Ext/clients/base/filters/basic/.
For this example,Â we will create:
./custom/Extension/modules/Accounts/Ext/clients/base/filters/basic/filterAccountByTypeAndIndustry.php
<?php


<?php
$viewdefs['Accounts']['base']['filter']['basic']['filters'][] = array(
    'id' => 'filterAccountByTypeAndIndustry',
    'name' => 'LBL_FILTER_ACCOUNT_BY_TYPE_AND_INDUSTRY',
    'filter_definition' => array(
        array(
            'account_type' => array(
                '$in' => array(
                    'Customer',
                ),
            ),
        ),
        array(
            'industry' => array(
                '$in' => array(
                    'Other',
                ),
            ),
        ),
    ),
    'editable' => false,
    'is_template' => false,
);


'is_template' => false,
);
You should notice that the editable and is_template options have been set to "false". If editable is not set to "false", the filter will not be displayed in the list view filter's list.
Finally, navigate to Admin > Repair and click "Quick Repair and Rebuild" to rebuild the extensions and make the predefined filter available for users.
Adding Initial Filters to Lookup Searches
To add initial filters to record lookups and type-ahead searches, define a filter template. This will allow youÂ to filter results for users when looking up a parent related record.Â The following example will demonstrate how to add an initial filter for the Account lookup on the Contacts module. This initial filter will limit recordsÂ to having anÂ account type of "Customer" and a dynamically assigned user value determined by the contact's assigned user.


To add an initial filter to the Contacts record view, create a display label for the filter in ./custom/Extension/modules/<module>/Ext/Language/.Â For this example , we will create:
./custom/Extension/modules/Accounts/Ext/Language/en_us.filterAccountTemplate.php
<?php
$mod_strings['LBL_FILTER_ACCOUNT_TEMPLATE'] = 'Customer Accounts By A Dynamic User';
Next, create aÂ custom template filter extension in Â ./custom/Extension/modules/<module>/Ext/clients/base/filters/basic/. For this example, create:
./custom/Extension/modules/Accounts/Ext/clients/base/filters/basic/filterAccountTemplate.php
<?php


<?php
$viewdefs['Accounts']['base']['filter']['basic']['filters'][] = array(
    'id' => 'filterAccountTemplate',
    'name' => 'LBL_FILTER_ACCOUNT_TEMPLATE',
    'filter_definition' => array(
        array(
            'account_type' => array(
                '$in' => array(),
            ),
        ),
        array(
            'assigned_user_id' => ''
        )
    ),
    'editable' => true,
    'is_template' => true,
);


'is_template' => true,
);
As you can see, the filter_definition contains arrays for account_type and assigned_user_id. These filter definitions will receive their values from the contact record view's metadata. You should also note that this filter hasÂ is_template and editable set to "true". This is required for initial filters.
Once the filter template is in place, modify the contact record view's metadata. To accomplish this, edit ./custom/modules/Contacts/clients/base/views/record/record.php to adjust the account_name field. If this file does not exist in your local Sugar installation, navigate to Admin > Studio > Contacts > Layouts > Record View and click "Save & Deploy" to generate it. In this file, identifyÂ the panel_body array as shown below:
1 =>
array (
    'name' => 'panel_body',


1 =>
array (
    'name' => 'panel_body',
    'label' => 'LBL_RECORD_BODY',
    'columns' => 2,
    'labelsOnTop' => true,
    'placeholders' => true,
    'newTab' => false,
    'panelDefault' => 'expanded',
    'fields' =>
    array (
        0 => 'title',
        1 => 'phone_mobile',
        2 => 'department',
        3 => 'do_not_call',
        4 => 'account_name',
        5 => 'email',
    ),
),
Next, modify the account_name field to contain theÂ initial filter parameters.Â
1 =>
array (
    'name' => 'panel_body',


1 =>
array (
    'name' => 'panel_body',
    'label' => 'LBL_RECORD_BODY',
    'columns' => 2,
    'labelsOnTop' => true,
    'placeholders' => true,
    'newTab' => false,
    'panelDefault' => 'expanded',
    'fields' =>
    array (
        0 => 'title',
        1 => 'phone_mobile',
        2 => 'department',
        3 => 'do_not_call',
        4 => array (
            //field name
            'name' => 'account_name',
            //the name of the filter template
            'initial_filter' => 'filterAccountTemplate',
            //the display label for users


//the display label for users
            'initial_filter_label' => 'LBL_FILTER_ACCOUNT_TEMPLATE',
            //the hardcoded filters to pass to the templates filter definition
            'filter_populate' => array(
                'account_type' => array('Customer')
            ),
            //the dynamic filters to pass to the templates filter definition
            //please note the index of the array will be for the field the data is being pulled from
            'filter_relate' => array(
                //'field_to_pull_data_from' => 'field_to_populate_data_to'
                'assigned_user_id' => 'assigned_user_id',
            )
        ),
        5 => 'email',
    ),
),


)
        ),
        5 => 'email',
    ),
),
Finally, navigate to Admin > Repair and clickÂ "Quick Repair and Rebuild". This will rebuild the extensions and make the initialÂ filter available for users when selecting a parent account for a contact.
Adding Initial Filters to Drawers from a Controller
When creating your own views, you may need to filter a drawer called from within your custom controller. Using an initial filter, as described in the Adding Initial Filters to Lookup SearchesÂ section, we can filter a drawer with predefined values by creating a filter object andÂ populating the config.filter_populateÂ property as shown below:
//create filter
var filterOptions = new app.utils.FilterOptions()
    .config({
        'initial_filter': 'filterAccountTemplate',


.config({
        'initial_filter': 'filterAccountTemplate',
        'initial_filter_label': 'LBL_FILTER_ACCOUNT_TEMPLATE',
        'filter_populate': {
            'account_type': ['Customer'],
            'assigned_user_id': 'seed_sally_id'
        }
    })
    .format();
//open drawer
app.drawer.open({
    layout: 'selection-list',
    context: {
        module: 'Accounts',
        filterOptions: filterOptions,
        parent: this.context
    }
});
To create a filtered drawer with dynamic values, create a filter object and populate the config.filter_relate property using the populateRelate method as shown below:
//record to filter related fields by


//record to filter related fields by
var contact = app.data.createBean('Contacts', {
    'first_name': 'John',
    'last_name': 'Smith',
    'assigned_user_id': 'seed_sally_id'
});
//create filter
var filterOptions = new app.utils.FilterOptions()
    .config({
        'initial_filter': 'filterAccountTemplate',
        'initial_filter_label': 'LBL_FILTER_ACCOUNT_TEMPLATE',
        'filter_populate': {
            'account_type': ['Customer'],
        },
        'filter_relate': {
            'assigned_user_id': 'assigned_user_id'
        }
    })
    .populateRelate(contact)
    .format();
//open drawer


.populateRelate(contact)
    .format();
//open drawer
app.drawer.open({
    layout: 'selection-list',
    context: {
        module: 'Accounts',
        filterOptions: filterOptions,
        parent: this.context
    }
});
  	Last modified: 2023-02-03 21:04:03


Administration
Overview
The Administration class is used to manage settings stored in the database config table.
The Administration Class
The Administration class is located in ./modules/Administration/Administration.php. Settings modified using this class are written to the config table.
Creating / Updating Settings
To create or update a specific setting, you can specify the new value using theÂ saveSetting() function as shown here:
require_once 'modules/Administration/Administration.php';
$administrationObj = new Administration();
//save the setting
$administrationObj->saveSetting("MyCategory", "MySetting", 'MySettingsValue');
Retrieving Settings
You can access the config settings by using theÂ retrieveSettings() function. You can filter the settings by category by passing in a filter parameter. If no value is passed to retrieveSettings(), all settings will be returned. An example is shown here:


require_once 'modules/Administration/Administration.php';
$administrationObj = new Administration();
//Retrieve all settings in the category of 'MyCategory'.
//This parameter can be left empty to retrieve all settings.
$administrationObj->retrieveSettings('MyCategory');
//Use a specific setting
$MySetting = $administrationObj->settings['MyCategory_MySetting'];
Considerations


Considerations
The Administration class will store the settings in the config table, and the config table is cached using SugarCache as the admin_settings_cache.Â This class should be used for storing dynamic settings for a module, connector or the system as a whole, such as the last run date (for a scheduler) or an expiring token (for a connector). You should not use the Administration class to store User-based settings, settings that are frequently changing or being written to via the API, or excessively large values, as this can degrade the performance of the instance since all settings are loaded into the admin_settings_cache, which is used throughout the system.


Alternatively, you can use the Configurator class, located in ./modules/Configurator/Configurator.php, to store the settings in the ./config_override.php file if the settings are not dynamic or not changing programmatically. ItÂ is important to note that settings stored using the configurator will cause a metadata hash refresh that may lead to users being logged out of the system.
  	Last modified: 2023-02-03 21:04:03


Configurator
Overview
The Configurator class, located in ./modules/Configurator/Configurator.php,Â handles the config settings found in ./config.php and ./config_override.php.
Retrieving Settings
You can access the Sugar config settings by using the global variable $GLOBALS['sugar_config'] as shown below:
global $sugar_config;
//Use a specific setting
$MySetting = $sugar_config['MySetting'];
If you should need to reload the config settings, this is an example of how to retrieve a specific setting using the configurator:
require_once 'modules/Configurator/Configurator.php';
$configuratorObj = new Configurator();
//Load config
$configuratorObj->loadConfig();
//Use a specific setting


//Load config
$configuratorObj->loadConfig();
//Use a specific setting
$MySetting = $configuratorObj->config['MySetting'];
Creating / Updating Settings
To create or update a specific setting, you can specify the new value using the configurator as shown below:
require_once 'modules/Configurator/Configurator.php';
$configuratorObj = new Configurator();
//Load config
$configuratorObj->loadConfig();
//Update a specific setting
$configuratorObj->config['MySetting'] = "MySettingsValue";
//Save the new setting
$configuratorObj->saveConfig();
Considerations


//Save the new setting
$configuratorObj->saveConfig();
Considerations
When looking to store custom settings, the Configurator class will store the settings in the ./config_override.php file. This class should only be used for long-termÂ configuration options asÂ Configurator->saveConfig() will trigger a metadata refresh that may log users out of the system.
Alternatively, you can use the Administration class, located in ./modules/Administration/Administration.php, to store settings in the config table in the database.Â This AdministrationÂ class should be used for storing dynamic settings such as a last run date or an expiring token.


TopicsCore SettingsSugar configuration settings.Silent Installer SettingsThe Sugar silent installer facilitates and automates the installation of the Sugar application after the files have been copied onto the server. This is done by populating correct parameters in a configuration file and then making a web request to kick off the installation.
  	Last modified: 2023-02-03 21:04:03


Core Settings
Overview
Sugar configuration settings.
Settings Architecture
When you first install Sugar, all of the default settings are located in ./config.php. As you begin configuring the system, the modified settings are stored in ./config_override.php. Settings in ./config.php are overridden by the values in ./config_override.php.
Settings
activitystreamcleaner
DescriptionArray that defines the parameters for the Activity Stream purger. TypeArrayVersions9.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['activitystreamcleaner'] = array();activitystreamcleaner.keep_all_relationships_activities


DescriptionThis value is used by the ActivityStreamPurger scheduler job to determine whether the link type activities are to be removed. By default, these records are removed along with other activity types such as create, update, etc.  This can be overridden by setting this value equal to true.TypeBooleanRange of valuestrue or falseVersions9.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['activitystreamcleaner']['keep_all_relationships_activities'] = true;activitystreamcleaner.limit_scheduler_run


DescriptionSets the number of activity stream records to delete per batch when run by the scheduled job that purges activity stream records.TypeInteger : Number of recordsRange of valuesIntegers, values below 0 become 0Versions9.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value25000Override Example$sugar_config['activitystreamcleaner']['limit_scheduler_run'] = 1000;activitystreamcleaner.months_to_keep


DescriptionThis value is used by the ActivityStreamPurger scheduler job.  When this job runs, it uses this value to determine which Activity Stream records to prune from the activities table.   Activities with a date older than the current date minus this number of months will be removed from the table.TypeInteger : Number of monthsRange of valuesAny integer greater than or equal to 0Versions9.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value6Override Example$sugar_config['activitystreamcleaner']['months_to_keep'] = 12;activity_streams
DescriptionArray that defines parameters for processing Data Privacy erasure requests for activity streams. TypeArrayVersions8.0.1+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['activity_streams'] = array();activity_streams.erasure_job_delay


DescriptionDefines the number of minutes between Activity Stream Erasure jobs. When multiple jobs are queued, this is the number of minutes that will separate their scheduled execution to allow Data Privacy erasures to occur in batches and minimize concurrent execution. These jobs can take some time to run and can tax the overall server performance if the number of Activity Stream records is very large. This setting is related to activity_streams.erasure_job_limit. These settings should be considered together to optimize throughput of Activity Erasure jobs.TypeInteger : MinutesVersions8.0.1+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value0Override Example$sugar_config['activity_streams']['erasure_job_delay'] = 5;activity_streams.erasure_job_limit


DescriptionDefines the maximum number of Data Privacy Records that can be processed by a single running instance of the Activity Stream Erasure job. This setting is related to activity_streams.erasure_job_delay. These settings should be considered together to optimize throughput of Activity Erasure jobs. For example, the longer that an activity erasure job processes, the more delay will be needed to prevent too many jobs executing in parallel.TypeIntegerVersions8.0.1+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value5Override Example$sugar_config['activity_streams']['erasure_job_limit'] = 8;additional_js_config


DescriptionConfiguration values for when the ./cache/config.js file is generated. It is important to note that after changing this setting or any of its subsettings in your configuration, you must navigate to Admin > Repairs > Quick Repair & Rebuild.TypeArrayVersions7.5.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['additional_js_config'] = array();additional_js_config.alertAutoCloseDelay


DescriptionDefines the default auto close delay for system alerts. It is important to note that after changing this setting in your configuration, you must navigate to Admin > Repairs > Quick Repair & Rebuild.TypeInteger : MillisecondsVersions7.8.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value9000Override Example$sugar_config['additional_js_config']['alertAutoCloseDelay'] = 3000;additional_js_config.authStore


DescriptionDefines the implementation of authentication data storage. The default storage, 'cache', is persistent and uses the localStorage API. Alternatively, 'cookie' storage may be used. This will store the authentication data in your browser window until the browser itself is closed. It is important to note that this behavior will differ between browsers. It is important to note that after changing this setting in your configuration, you must navigate to Admin > Repairs > Quick Repair & Rebuild.
Note: This setting is not respected for instances that use SugarIdentity.TypeStringRange of values'cache' and 'cookie'Versions7.5.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuecacheOverride Example$sugar_config['additional_js_config']['authStore'] = 'cookie';additional_js_config.disableOmnibarTypeahead


DescriptionDisables the typeahead feature in the listview Omnibar and force users to hit Enter when filtering. From a technical perspective, this will reduce the number of hits to the server.TypeBooleanRange of valuestrue and falseVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['additional_js_config']['disableOmnibarTypeahead'] = true;additional_js_config.logger.write_to_server
DescriptionEnables the front end messages to be logged. The logger level must be tuned accordingly under Administration settings. Developers can set the client-side flag by running App.config.logger.writeToServer = true; in their browser's console.


To simulate logging actions through the console, developers can use:App.logger.trace('message');App.logger.debug('message');App.logger.info('message');App.logger.warn('message');App.logger.fatal('message');TypeBooleanRange of valuestrue and falseVersions7.5.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['additional_js_config']['logger']['write_to_server'] = true;additional_js_config.sidecarCompatMode


DescriptionBy default, the Sidecar framework will prevent customizations from calling private Sidecar methods. If after upgrading you find this to be an issue, the configuration can be set to true as a temporary workaround. All JavaScript customizations are expected to use public Sidecar APIs. TypeBooleanRange of valuestrue and falseVersions7.10.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['additional_js_config']['sidecarCompatMode'] = true;admin_access_control


DescriptionRemoves Sugar Updates, Upgrade Wizard, Backups and Module Builder from the Admin menu. For developers, these restrictions can be found in ./include/MVC/Controller/file_access_control_map.php and overriden by creating ./custom/include/MVC/Controller/file_access_control_map.php.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['admin_access_control'] = true;admin_export_only
DescriptionAllow only users with administrative privileges to export data.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['admin_export_only'] = true;allowFreezeFirstColumn


DescriptionGlobal admin config that turns the frozen first columns on/off. This setting can be toggled on and off via Admin > System Settings in Sugar or via code in the config.php file. When this setting is turned off, the ability to freeze the first column of data on a list view is disabled. If the setting is enabled, users will have an option to either freeze or unfreeze the first column on a per-module basis, similar to how you can toggle whether or not a field is included as a column in your list view. Instances running on Sugar's cloud environment will have this setting enforced as true.TypeBooleanVersions12.0.0+ProductsEnterprise, Serve, SellDefault ValuetrueSugarCloud ValuetrueOverride Example$sugar_config['allowFreezeFirstColumn'] = false;allow_oauth_via_get


DescriptionAs of 7.8, Sugar does not support auth tokens being passed in from GET query string parameters by default. While allowing this functionality is not a recommended practice from a security standpoint, administrators may enable the setting at their own risk.TypeBooleanRange of valuestrue and falseVersions7.8.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['allow_oauth_via_get'] = true;allow_pop_inbound


DescriptionInbound email accounts are setup to work with IMAP protocols by default. If your email provider required POP3 access instead of IMAP, you can enables POP3 as an available inbound email protocol. Please note that mailboxes configured with a POP3 connection are not supported by SugarCRM and may cause unintended consequences. IMAP is the recommended protocol to use for inbound email accounts.TypeBooleanRange of valuestrue and falseVersions5.5.1+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['allow_pop_inbound'] = true;allow_sendmail_outbound


DescriptionEnables the option of choosing sendmail as an SMTP server in Admin > Email Settings. Sendmail must be enabled on the server for this option to work. Please note that mailboxes configured with sendmail are not supported and may cause unintended consequences. Instances running on Sugar's cloud environment will have this setting enforced as false.TypeBooleanRange of valuestrue and falseVersions5.5.1+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseSugarCloud ValuefalseOverride Example$sugar_config['allow_sendmail_outbound'] = true;analytics


DescriptionAn array defining properties for an analytics connector. Instances running on Sugar's cloud environment will have this setting enforced as a predetermined array.TypeArrayVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellSugarCloud Valuea predetermined arrayOverride Example$sugar_config['analytics'] = array();analytics.connector
DescriptionThe name of the connector to use for gathering analytics. Instances running on Sugar's cloud environment will have this setting enforced as a predetermined value.TypeString : Connector nameVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellSugarCloud Valuea predetermined valueOverride Example$sugar_config['analytics']['connector'] = 'Pendo';analytics.enabled


DescriptionDetermines if the analytics are enabled. Instances running on Sugar's cloud environment will have this setting enforced as true.TypeBooleanRange of valuestrue and falseVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseSugarCloud ValuetrueOverride Example$sugar_config['analytics']['enabled'] = true;analytics.id
DescriptionThe tracking id for the analytics connector. Instances running on Sugar's cloud environment will have this setting enforced as a predetermined value.TypeString : Tracking IDVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellSugarCloud Valuea predetermined valueOverride Example$sugar_config['analytics']['id'] = 'UA-XXXXXXX-X';api


DescriptionAPI specific configurations.TypeIntegerVersions7.5.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['api']=array();api.timeout
DescriptionThe timeout in seconds when uploading files through the REST API.TypeInteger : SecondsVersions7.5.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value180Override Example$sugar_config['api']['timeout'] = 240;authenticationClass
DescriptionThe class to be used for login authentication.TypeString : Sugar Authentication ClassRange of valuesSAMLAuthenticateVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueSugarAuthenticateOverride Example$sugar_config['authenticationClass'] = 'SAMLAuthenticate';aws


DescriptionThis configuration's functionality has been deprecated and will be removed in an upcoming release.TypeArrayVersions6.7.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['aws'] = array();aws.aws_key
DescriptionThis configuration's functionality has been deprecated and will be removed in an upcoming release.TypeString : KeyVersions6.7.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['aws']['aws_key'] = 'key';aws.aws_secret
DescriptionThis configuration's functionality has been deprecated and will be removed in an upcoming release.TypeString : KeyVersions6.7.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['aws']['aws_secret'] = 'secret';aws.upload_bucket


DescriptionThis configuration's functionality has been deprecated and will be removed in an upcoming release.TypeString : S3 bucket nameVersions6.7.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['aws']['upload_bucket'] = 'bucket';cache
DescriptionArray that defines additional properties for SugarCache if it's enabled (see external_cache).TypeArrayVersions8.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['cache'] = array();cache.backend


DescriptionDefines the SugarCache backend to use via a fully qualified class name (FQCN). Instances running on Sugar's cloud environment will have this setting enforced as Sugarcrm\Sugarcrm\Cache\Backend\BackwardCompatible.TypeString : Cache LibraryRange of values'Sugarcrm\Sugarcrm\Cache\Backend\Redis' , '\Sugarcrm\Sugarcrm\Cache\Backend\APCu' , '\Sugarcrm\Sugarcrm\Cache\Backend\Memcached' , '\Sugarcrm\Sugarcrm\Cache\Backend\InMemory' , ''Versions8.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueSugarcrm\Sugarcrm\Cache\Backend\BackwardCompatibleSugarCloud


ValueSugarcrm\Sugarcrm\Cache\Backend\BackwardCompatibleOverride Example$sugar_config['cache']['backend'] = 'Sugarcrm\Sugarcrm\Cache\Backend\Redis';cache.disable_gz


DescriptionDefines whether the SugarCache compression should be disabled in multi-tenant deployment, which is not applicable without cache.multi_tenant. This will modify Sugar's caching behavior to disable compression of the cached data. Instances running on Sugar's cloud environment will have this setting enforced as false.TypeBooleanRange of valuestrue and falseVersions12.1.0+ProductsEnterprise, Serve, SellDefault ValuefalseSugarCloud ValuefalseOverride Example$sugar_config['cache']['disable_gz'] = true;cache.encryption_key


DescriptionUsed to store encryption key for SugarCache is in multi-tenant mode. By default, Sugar will generate a random UUID string for the encryption key as needed. It is not recommended to change or override this value since it will be regenerated whenever the cache is cleared. Not applicable without  cache.multi_tenant. Instances running on Sugar's cloud environment will have this setting enforced as Random value (unique for each SugarCloud instance).TypeString : UUID stringRange of valuesN/A as it is generated automaticallyVersions8.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueRandom value (generated on cache initialization)SugarCloud ValueRandom value (unique for each SugarCloud instance)Override Example$sugar_config['cache']['encryption_key'] = 'Sugar-generated encryption key';cache.gz_level


DescriptionDefines the SugarCache compression level, which is not applicable without cache.multi_tenant. Instances running on Sugar's cloud environment will have this setting enforced as 9.TypeIntegerRange of values0, 1, 2, 3, 4, 5, 6, 7, 8, 9Versions12.1.0+ProductsEnterprise, Serve, SellDefault Value9SugarCloud Value9Override Example$sugar_config['cache']['gz_level'] = 2;cache.multi_tenant


DescriptionDefines whether the SugarCache backend will be used by multiple Sugar instances as part of a multi-tenant deployment. This will modify Sugar's caching behavior to maintain isolation between Sugar instances. Instances running on Sugar's cloud environment will have this setting enforced as true.TypeBooleanRange of valuestrue and falseVersions8.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseSugarCloud ValuetrueOverride Example$sugar_config['cache']['multi_tenant'] = true;cache_dir
DescriptionThis is the directory SugarCRM will store all cached files. Can be relative to Sugar root directory.TypeString : DirectoryVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Valuecache/Override Example$sugar_config['cache_dir'] = 'cache/';cache_expire_timeout


DescriptionThe length of time cached items should be expired after. TypeInteger : SecondsVersions6.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value300Override Example$sugar_config['cache_expire_timeout'] = 400;calendar
DescriptionAn array that defines all of the various settings for the Calendar module.TypeArrayVersions6.4.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['calendar'] = array();calendar.day_timestep
DescriptionSets the default day time step.TypeInteger : DaysRange of values15, 30 and 60Versions6.4.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value15Override Example$sugar_config['calendar']['day_timestep'] = 15;calendar.default_view


DescriptionChanges the default view in the calendar module.TypeStringRange of values'day', 'week', 'month' and 'share'Versions6.4.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['calendar']['default_view'] = 'week';calendar.items_draggable
DescriptionEnable/Disable drag-and-drop feature to move calendar items.TypeBooleanRange of valuestrue and falseVersions6.4.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuetrueOverride Example$sugar_config['calendar']['items_draggable'] = true;calendar.items_resizable


DescriptionSets whether items on the calendar can be resized via clicking and dragging.TypeBooleanRange of valuestrue and falseVersions6.5.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuetrueOverride Example$sugar_config['calendar']['items_resizable'] = true;calendar.show_calls_by_default
DescriptionDisplay/Hide calls by default.TypeBooleanRange of valuestrue and falseVersions6.4.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuetrueOverride Example$sugar_config['calendar']['show_calls_by_default'] = true;calendar.week_timestep


DescriptionThe default week step size when viewing the calendar.TypeInteger : Calendar Step SizeRange of values15, 30, and 60Versions6.4.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['calendar']['week_timestep'] = 30;check_query
DescriptionValidates queries when adding limits.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuetrueOverride Example$sugar_config['check_query'] = true;check_query_cost
DescriptionSets the maximum cost limit of a query.TypeIntegerVersions5.2.0+ProductsEnterprise, Ultimate, Serve, SellDefault Value10Override Example$sugar_config['check_query_cost'] = 10;clear_resolved_date


DescriptionIn Sugar Serve version 9.3 and higher, the Resolved Date field on Cases is automatically cleared when the case's status changes from "Closed", "Rejected", or "Duplicate" to any other value. Setting this parameter to false prevents Sugar from automatically clearing the Resolved Date field.TypeBooleanRange of valuestrue and falseVersions9.3.0+ProductsServeDefault ValuetrueOverride Example$sugar_config['clear_resolved_date'] = false;cloud_insight
DescriptionArray that defines the properties for SugarCloud Insights. TypeArrayVersions9.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['cloud_insight'] = array();cloud_insight.enabled


DescriptionDetermines if the SugarCloud Insights service is enabled. TypeBooleanRange of valuestrue and falseVersions9.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuetrueOverride Example$sugar_config['cloud_insight']['enabled'] = false;cloud_insight.key
DescriptionSpecifies the unique key for the SugarCloud Insights service.TypeString : KeyVersions9.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['cloud_insight']['key'] = '<insights key>';cloud_insight.url


DescriptionThe current URL for SugarCloud Insights service. TypeString : URLVersions9.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['cloud_insight']['url'] = 'https://sugarcloud-insights.service.sugarcrm.com';collapse_subpanels


DescriptionPertains to Sidecar modules only. By default, all subpanels are in a collapsed state. If a user expands a subpanel, Sugar caches this preference so that it remains expanded on future visits to the same view. Set this value to 'true' to force a collapsed state for subpanels regardless of user preference, which may improve page-load performance by not querying for data until a user explicitly chooses to expand a subpanel.TypeBooleanRange of valuestrue and falseVersions7.6.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuetrueOverride Example$sugar_config['collapse_subpanels'] = true;cron


DescriptionArray that defines all of the cron parameters.TypeArrayVersions6.5.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['cron'] = array();cron.enforce_runtime
DescriptionDetermines if cron.max_cron_runtime is enforced during the cron run.TypeBooleanRange of valuestrue and falseVersions7.2.2.2+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['cron']['enforce_runtime'] = true;cron.max_cron_jobs


DescriptionMaximum jobs per cron run. Default is 10. If you are using a version prior to 6.5.14, you will need to also populate max_jobs to set this value due to bug #62936 ( https://web.sugarcrm.com/support/issues/62936 ).TypeIntegerVersions6.5.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value6.5.x: 107.6.x: 25Override Example$sugar_config['cron']['max_cron_jobs'] = 10;cron.max_cron_runtime


DescriptionDetermines the maximum time in seconds that a single job should be allowed to run. If a single job exceeds this limit, cron.php is aborted with the long-running job marked as in progress in the job queue. The next time cron runs, it will skip the job that overran the limit and start on the next job in the queue. This limit is only enforced when cron.enforce_runtime is set to true.TypeInteger : SecondsVersions6.5.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value180Override Example$sugar_config['cron']['max_cron_runtime'] = 60;cron.min_cron_interval


DescriptionMinimum time between cron runs. Setting this to 0 will disable throttling completely.TypeInteger : SecondsVersions6.5.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value30Override Example$sugar_config['cron']['min_cron_interval'] = 30;csrf
DescriptionAn array defining attributes for CSRF token protection.TypeArrayVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['csrf'] = array();csrf.soft_fail_form


DescriptionWhen opted in for CSRF form authentication, any failures will result in a CSRF message to the user indicating a potential CSRF attack and an aborted action. If you are unsure whether the CSRF tokens are properly implemented in your backward compatible modules, this configuration parameter can be set to true. Setting this to true will avoid any exceptions being thrown to the end user. By default, any failures will result in a fatal log message indicating the issue. If you are running in  "soft failure", a second fatal message will be logged such as "CSRF: attack vector NOT mitigated, soft failure mode enabled". Be careful enabling this configuration as it will only log CSRF authentication failures and will not protect your system.TypeBooleanRange of valuestrue and falseVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['csrf']['soft_fail_form'] =


Example$sugar_config['csrf']['soft_fail_form'] = true;csrf.token_size


DescriptionThe size in bytes of the CSRF token to generate.TypeInteger : BytesVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value32Override Example$sugar_config['csrf']['token_size'] = 16;customPortalPlatforms
DescriptionThis configuration allows a platform with custom authentication to be excluded from an IDM integration.TypeArray : PlatformsVersions9.1.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['customPortalPlatforms'] = array('platform1', 'platform2');custom_help_base_url


DescriptionAllows an instance to specify a custom help url for their userTypeString : URLVersions6.4.3+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Valuehttp://www.sugarcrm.com/crm/product_doc.phpOverride Example$sugar_config['custom_help_base_url'] = 'http://www.custom_url/index.php';custom_help_url
DescriptionDesignate the URL used to redirect the user to help documentation.TypeString : Website addressVersions6.4.3+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Valuehttp://www.sugarcrm.com/crm/product_doc.phpOverride Example$sugar_config['custom_help_url'] = 'http://www.sugarcrm.com/crm/product_doc.php';dbconfig


DescriptionDefines all of the connection parameters for the database server.TypeArrayVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['dbconfig'] = array();dbconfig.db_host_instance
DescriptionDefines the host instance for MSSQL connections.TypeString : Database Host Instance NameVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueemptyOverride Example$sugar_config['dbconfig']['db_host_instance'] = 'SQLEXPRESS';dbconfig.db_host_name


DescriptionPart of the 'dbconfig' array. Defines the host name of the database server.TypeString : Host nameRange of valueshost name of database serverVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueemptyOverride Example$sugar_config['dbconfig']['db_host_name'] = 'localhost';dbconfig.db_manager


DescriptionPart of the 'dbconfig' array. Defines the specific library used to connect with your database. Instances running on Sugar's cloud environment will have this setting enforced as MysqliManager.TypeString : Database ManagerRange of valuesThe class name of the database driver, Possible values are: 'MysqlManager', 'MysqliManager', 'FreeTDSManager', 'MssqlManager', and 'SqlsrvManager'.Versions6.4.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueDetermined by install: 'MysqlManager', 'MysqliManager', 'FreeTDSManager', 'MssqlManager', or 'SqlsrvManager'SugarCloud ValueMysqliManagerOverride Example$sugar_config['dbconfig']['db_manager'] = 'MysqliManager';dbconfig.db_name


DescriptionPart of the 'dbconfig' array. Defines the database name to connect to on the database server.TypeString : Database NameRange of valuesdatabase nameVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueemptyOverride Example$sugar_config['dbconfig']['db_name'] = 'sugar_db';dbconfig.db_password
DescriptionPart of the 'dbconfig' array. Defines the password that correlates to the db_user_name parameter.TypeString : PasswordRange of valuespassword of the user defined in db_user_nameVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueemptyOverride Example$sugar_config['dbconfig']['db_password'] = 'sql_password';dbconfig.db_port


DescriptionPart of the 'dbconfig' array. Defines the port number on the server to connect to for authentication and transactions.TypeString : Network PortRange of valuesport number to connect to on the database serverVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value3306Override Example$sugar_config['dbconfig']['db_port'] = '3306';dbconfig.db_type
DescriptionDefines the type of database being used with Sugar. It is important to note that db2 and oracle are only applicable to Sugar Enterprise and Ultimate.TypeString : Database EngineRange of values'mysql', 'mssql', 'db2', and 'oci8'Versions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['dbconfig']['db_type'] = 'mysql';dbconfig.db_user_name


DescriptionDefines the user to connect to the Sugar database as.TypeString : Database UserVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['dbconfig']['db_user_name'] = 'sql_user';dbconfigoption.autofree
DescriptionAutomatically frees the database reference when it closes the reference.TypeBooleanRange of valuestrue and falseVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['dbconfigoption']['autofree'] = true;dbconfigoption.collation


DescriptionThe set of rules to be used for comparing characters in a character set.TypeString : Collation typeVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Valueutf8_general_ciOverride Example$sugar_config['dbconfigoption']['collation'] = 'utf8_general_ci';dbconfigoption.debug
DescriptionEnables debugging on the database connection.TypeBooleanRange of valuestrue and falseVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['dbconfigoption']['debug'] = true;dbconfigoption.persistent


DescriptionDetermines whether Sugar should use persistent connection when possible to connecting to the database.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['dbconfigoption']['persistent'] = true;dbconfigoption.ssl
DescriptionEnables SSL on the database connection.TypeBooleanRange of valuestrue and falseVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['dbconfigoption']['ssl'] = true;dbconfigoption.ssl_options


DescriptionAn array detailing the SSL database connection options.TypeArrayRange of valuestrue and falseVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueemptyOverride Example$sugar_config['dbconfigoption']['ssl_options'] = array();dbconfigoption.ssl_options.ssl_capath
DescriptionThe path the trusted SSL certificate authority file in PEM format for SSL connection to the database.TypeString : File pathRange of valuestrue and falseVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueemptyOverride Example$sugar_config['dbconfigoption']['ssl_options']['ssl_capath'] = 'path/to/ca-cert';dbconfigoption.ssl_options.ssl_cert


DescriptionThe path the SSL certificate file for SSL connection to the database.TypeString : File pathRange of valuestrue and falseVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueemptyOverride Example$sugar_config['dbconfigoption']['ssl_options']['ssl_cert'] = 'path/to/cert';dbconfigoption.ssl_options.ssl_cipher
DescriptionThe SSL cipher to be used for encryption.TypeString : CipherRange of valuestrue and falseVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueemptyOverride Example$sugar_config['dbconfigoption']['ssl_options']['ssl_cipher'] = 'cipher';dbconfigoption.ssl_options.ssl_key


DescriptionThe path the SSL key for SSL connection to the database.TypeString : File pathRange of valuestrue and falseVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueemptyOverride Example$sugar_config['dbconfigoption']['ssl_options']['ssl_key'] = 'path/to/key';default_currency_significant_digits
DescriptionChanges the number of significant digits in currency by default.TypeInteger : Number of significant digitsVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value2Override Example$sugar_config['default_currency_significant_digits'] = 2;default_date_format


DescriptionModifies the default date format for all users.TypeString : Date formatVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Valuem/d/YOverride Example$sugar_config['default_date_format'] = 'm/d/Y';default_decimal_seperator
DescriptionSets the character used as a decimal separator for numbers.TypeString : Text characterRange of valuesAny characterVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value.Override Example$sugar_config['default_decimal_seperator'] = '.';default_email_client


DescriptionSets the default email client that opens when users send emails.TypeString : Email clientRange of values'sugar', 'external'Versions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuesugarOverride Example$sugar_config['default_email_client'] = 'sugar';default_language


DescriptionSets each user's default language.  Possible values include any language offered by Sugar, such as: 'ar_SA', 'bg_BG', 'ca_ES', 'cs_CZ', 'da_DK', 'de_DE', 'el_EL', 'en_UK', 'en_us', 'es_ES', 'es_LA', 'et_EE', 'fi_FI', 'fr_FR', 'he_IL', 'hu_HU', 'it_it', 'ja_JP', 'ko_KR', 'lt_LT', 'lv_LV', 'nb_NO', 'nl_NL', 'pl_PL', 'pt_BR', 'pt_PT', 'ro_RO', 'ru_RU', 'sk_SK', 'sq_AL', 'sr_RS', 'sv_SE', 'tr_TR', 'uk_UA',


'sr_RS', 'sv_SE', 'tr_TR', 'uk_UA', 'zh_CN'TypeString : Language keyRange of valuesAny available languageVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Valueen_usOverride Example$sugar_config['default_language'] = 'en_us';default_number_grouping_seperator


DescriptionSets the character used as the 1000s separator for numbers.TypeString : Text characterRange of valuesAny characterVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value,Override Example$sugar_config['default_number_grouping_seperator'] = ',';default_permissions
DescriptionArray that defines the ownership and permissions for directories and files created naturally by the application.TypeArrayVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['default_permissions'] = array();default_permissions.dir_mode


DescriptionPart of the 'default_permissions' array. Used in UNIX-based systems only to define the permissions on newly created directories. The value is stored in decimal notation while UNIX file permissions are octal. For example, an octal value of 1528 equates to the permissions 2770. Instances running on Sugar's cloud environment will have this setting enforced as 1528.TypeInteger : Octal ValueVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellSugarCloud Value1528Override Example$sugar_config['default_permissions']['dir_mode'] = 1528;default_permissions.file_mode


DescriptionPart of the 'default_permissions' array. Used in UNIX-based systems only to define the permissions on newly created files. The value is stored in decimal notation while UNIX file permissions are octal. For example, an octal value of 432 in equates to the permissions 660. Instances running on Sugar's cloud environment will have this setting enforced as 432.TypeInteger : Octal valueVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellSugarCloud Value432Override Example$sugar_config['default_permissions']['file_mode'] = 432;default_permissions.group


DescriptionUsed in UNIX-based systems only to define the group membership of any newly created directories and files. This value should be a group that the Apache user is a member of to help ensure proper functionality. Instances running on Sugar's cloud environment will have this setting enforced as empty.TypeString : Web groupVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellSugarCloud ValueemptyOverride Example$sugar_config['default_permissions']['group'] = 'apache';default_permissions.user


DescriptionPart of the 'default_permissions' array. Used in UNIX-based systems only to define the ownership of any newly created directories and files. This value should be the Apache user. Instances running on Sugar's cloud environment will have this setting enforced as empty.TypeString : Web userRange of valuesApache userVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellSugarCloud ValueemptyOverride Example$sugar_config['default_permissions']['user'] = 'apache';default_user_is_admin
DescriptionAllows for determining whether a user is a system administrator by default.TypeBooleanRange of valuestrue, falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['default_user_is_admin'] = true;deny_license_update


DescriptionDetermines whether the license key in Admin > License Management is editable in the user interface. Instances running on Sugar's cloud environment will have this setting enforced as true.TypeBooleanRange of valuestrue and falseVersions9.3.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseSugarCloud ValuetrueOverride Example$sugar_config['deny_license_update'] = true;developerMode
DescriptionRebuilds various cached files when a page is accessed. Can be set by an admin in Admin > System Settings. Instances running on Sugar's cloud environment will have this setting enforced as false.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseSugarCloud ValuefalseOverride Example$sugar_config['developerMode'] = true;developer_mode_visible


DescriptionDetermines whether the Developer Mode flag is visible to administrators in Admin > System Settings.  Instances running on Sugar's cloud environment will have this setting enforced as false.TypeBooleanRange of valuestrue or falseVersions11.3.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuetrueSugarCloud ValuefalseOverride Example$sugar_config['developer_mode_visible'] = false;diagnostic_file_max_lifetime
DescriptionThe interval in seconds of when to expire and remove diagnostic files. It is important to note that the "Remove diagnostic files" scheduler job must be enabled to remove the diagnostic files.TypeInteger : SecondsVersions7.6.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value604800Override Example$sugar_config['diagnostic_file_max_lifetime'] = 604800;disabled_languages


DescriptionAllows an admin to select languages that are disabled for the instance.TypeString : CSV Language KeysVersions6.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValueemptyOverride Example$sugar_config['disabled_languages'] = 'bg_BG,da_DK,de_DE';disable_count_query
DescriptionRemoves the count totals from listviews. This is commonly used to prevent performing expensive count queries on the database when loading listviews and subpanels. It is important to note that in 7.x, this parameter will only affect modules running in Backward Compatibility mode.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['disable_count_query'] = true;disable_export


DescriptionPrevents exports of data into .csv files. Normally set in the UI via Admin > Locale.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['disable_export'] = true;disable_related_calc_fields


DescriptionWhen a calculated field in Sugar uses the related function in the Sugar Logic, this will cause the calculated field to be executed when the related module is updated. This can cause a cascading effect through the system to update related calculated fields. When this happens you may receive a 502 Gateway Error. Please note that this is a global setting that will affect all modules. If you have a calculated field in Accounts that sums up all Opportunities for the account, setting this value to true will no longer update the opportunity account sum in Accounts until the account record itself is modified. However, if this setting is left disabled, the sum would update any time a related opportunity or the account is modified.TypeBooleanRange of valuestrue and falseVersions6.3.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['disable_related_calc_fields'] = true;disable_team_access_check


DescriptionPrevents the system from checking to see if the creating/editing user has access to the record being saved. In normal circumstances, if a user creates a record and assigns it to a team they are not part of - their private team will be added. Setting this to true will prevent this.TypeBooleanRange of valuestrue and falseVersions5.5.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['disable_team_access_check'] = true;disable_unknown_platforms


DescriptionControls whether or not unregistered platforms are allowed to be used when logging in using REST API. Custom platforms can be registered via Admin > Configure API Platforms or by using the Platform extension. Used to prevent excessive metadata generation when invalid or unrecognized platform types are specified in an API call.TypeBooleanRange of valuestrue and falseVersions7.6.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value7.6 - 7.10: false7.11 and higher: trueOverride Example$sugar_config['disable_unknown_platforms'] = true;disable_uw_upload


DescriptionDisables the upgrade wizard from being accessible through the Sugar admin interface. Instances running on Sugar's cloud environment will have this setting enforced as true.TypeBooleanRange of valuestrue and falseVersions5.2.0.j+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseSugarCloud ValuetrueOverride Example$sugar_config['disable_uw_upload'] = true;disable_vcr


DescriptionDisables record paging in the detailview (VCR controls). Increases performance by not loading all records from a listview into memory when accessing the record detailview. In 7.x versions, this setting is only applicable to modules running in Backward Compatibility Mode.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['disable_vcr'] = true;dump_slow_queries
DescriptionLogs slow queries to the sugar log file. Instances running on Sugar's cloud environment will have this setting enforced as false.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseSugarCloud ValuefalseOverride Example$sugar_config['dump_slow_queries'] = true;email_address_separator


DescriptionSets the character used to separate email addresses.TypeString : Text characterRange of valuesAny characterVersions6.4.3+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value,Override Example$sugar_config['email_address_separator'] = ',';email_default_client
DescriptionSets the default email client for all users.TypeString : StringRange of valuessugar, externalVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuesugarOverride Example$sugar_config['email_default_client'] = 'sugar';email_default_delete_attachments


DescriptionWhen deleting an email, this setting will mark all related notes as deleted, and attempt to delete files that are related to those notes.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuetrueOverride Example$sugar_config['email_default_delete_attachments'] = false;email_default_editor
DescriptionAllows configuring the default editor type for email. 'plain' sets the editor to only use plain text. 'html' allows the editor to be html enabled.TypeString : StringRange of values'plain' and 'html'Versions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuehtmlOverride Example$sugar_config['email_default_editor'] = 'plain';email_mailer_timelimit


DescriptionThe timeout period in seconds for SMTP commands. Instances running on Sugar's cloud environment will have this setting enforced as 2.TypeInteger : SecondsRange of valuesAny integer greater than or equal to 1Versions12.2.0+ProductsEnterprise, Ultimate, Serve, SellDefault Value2SugarCloud Value2Override Example$sugar_config['email_mailer_timelimit'] = 30;email_mailer_timeout
DescriptionThe connection timeout period when sending an email.
Note: The default value for this configuration is 2 seconds for Sugar versions 12.2.0 and higher. The default value for Sugar versions 7.8.0.0 to 12.1.0 is 10 seconds.


Instances running on Sugar's cloud environment will have this setting enforced as 2.TypeInteger : SecondsVersions7.8.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value2SugarCloud Value2Override Example$sugar_config['email_mailer_timeout'] = 30;email_recipient_chunk_size


DescriptionDefines the maximum number of addresses in the email's To field. If an email is to be sent to more than the email_recipient_chunk_size addresses, the list will be split and multiple duplicate emails will be sent, each one with no more than the email_recipient_chunk_size recipients in the To field. Some email service providers limit maximum number of recipients in an email, this option is intended to workaround such limitations. Instances running on Sugar's cloud environment will have this setting enforced as 10.TypeIntegerRange of valuesAny integer greater than or equal to 1Versions12.1.0+ProductsEnterprise, Serve, SellDefault Value10SugarCloud Value10Override Example$sugar_config['email_recipient_chunk_size'] = 20;enable_link_to_drawer


DescriptionWhen true, the link-to-drawer feature known as "Focus Drawers" will be enabled for links to Sidecar module records instance-wide. Focus Drawers are exclusive to Sugar Sell and Sugar Serve.TypeBooleanRange of valuestrue and falseVersions10.3.0+ProductsServe, SellDefault ValuetrueOverride Example$sugar_config['enable_link_to_drawer'] = false;enable_long_text_search
DescriptionWhen true, Elasticsearch will enable long-text search for the following field types: 'longtext', 'htmleditable_tinymce'.TypeBooleanRange of valuestrue and falseVersions10.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['enable_long_text_search'] = true;enable_mobile_redirect


DescriptionFlag indicating whether smartphone users are automatically redirected to the mobile view when navigating to a Sugar instance.TypeBooleanRange of valuestrue and falseVersions7.1.5+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuetrueOverride Example$sugar_config['enable_mobile_redirect'] = false;enable_one_index


DescriptionIf you are running Elasticsearch 6 or higher, Elasticsearch creates a separate index for each full-text-search-enabled module. However, performance advantages are gained from instead using a single index for the entire instance. The 'enable_one-index' config enables you to move from 1-index-per-module to 1-index-per-instance. This setting can be enabled by an administrator via Admin > Search > Re-Index, and the re-index will automatically switch the instance over to 1 index and change this config to true. TypeBooleanRange of valuestrue or falseVersions11.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['enable_one_index'] = true;exclude_notifications


DescriptionThis setting controls the modules that are excluded from assignment notifications.TypeArrayVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['exclude_notifications'] = array();exclude_notifications.module
DescriptionAllows an administrator to explicitly disable modules from sending assignment notifications to users.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['exclude_notifications']['<module>'] = true;external_cache
DescriptionSugarCache basic configuration.TypeArrayVersions6.2.0+ProductsEnterprise, Serve, SellOverride Example$sugar_config['external_cache'] = array();external_cache.memcache


DescriptionThis setting controls the memcache properties.TypeArrayVersions6.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['external_cache']['memcache'] = array();external_cache.memcache.host
DescriptionThe host url for memchache.TypeString : Host URLVersions6.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value127.0.0.1Override Example$sugar_config['external_cache']['memcache']['host'] = '192.168.1.1';external_cache.memcache.port


DescriptionThe host port for memcache.TypeInteger : Port numberVersions6.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value11211Override Example$sugar_config['external_cache']['memcache']['port'] = 11212;external_cache.redis
DescriptionThis setting controls the redis properties.TypeArrayVersions9.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['external_cache']['redis'] = array();external_cache.redis.host


DescriptionThe IP address or the hostname of the Redis host.TypeStringRange of values'127.0.0.1', '192.168.0.2', 'redis.serveraddress.com', 'local.redis.server.local'Versions9.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value127.0.0.1Override Example$sugar_config['external_cache'] ['redis'] ['host'] = '127.0.0.1';external_cache.redis.persistent


DescriptionThe type of connection to the Redis server: persistent or not.TypeBooleanRange of valuestrue and falseVersions9.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuetrueOverride Example$sugar_config['external_cache'] ['redis'] ['persistent'] = false;external_cache.redis.port
DescriptionThe Port number configured in the Redis host.TypeIntegerRange of valuesAny TCP port numberVersions9.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value6379Override Example$sugar_config['external_cache'] ['redis'] ['port'] = 6377;external_cache.redis.timeout


DescriptionConnection timeout to the Redis server. 0 means unlimited or OS defined.TypeIntegerRange of valuesAny integer greater than or equal to 0Versions9.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value0Override Example$sugar_config['external_cache'] ['redis'] ['timeout'] = false;external_cache_db_gc_probability
DescriptionProbability factor to determine when garbage collection on stale keys from the DB backend will happen.TypeInteger : Probability factorVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value0.0001Override Example$sugar_config['external_cache_db_gc_probability'] = 0.0005;external_cache_db_gc_threshold


DescriptionThe threshold in milliseconds to flag garbage collection queries as [SLOW] in sugarcrm.log.TypeInteger : MillisecondsRange of valuestrue and falseVersions7.7.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value200Override Example$sugar_config['external_cache_db_gc_threshold'] = 500;external_cache_disabled
DescriptionDisables all external caching in Sugar. This is normally set to true to determine if there is a conflict with PHP caching. Instances running on Sugar's cloud environment will have this setting enforced as true.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseSugarCloud ValuetrueOverride Example$sugar_config['external_cache_disabled'] = true;external_cache_disabled_memcached


DescriptionDisables Memcached caching from working with Sugar. Recommended setting is false and is normally set to true to determine if there is a conflict with PHP caching. Instances running on Sugar's cloud environment will have this setting enforced as true.TypeBooleanRange of valuestrue and falseVersions6.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseSugarCloud ValuetrueOverride Example$sugar_config['external_cache_disabled_memcached'] = false;external_cache_disabled_wincache


DescriptionDisables WinCache caching from working with Sugar. Recommended setting is false and is normally set to true to determine if there is a conflict with PHP caching. Instances running on Sugar's cloud environment will have this setting enforced as true.TypeBooleanRange of valuestrue and falseVersions6.0.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseSugarCloud ValuetrueOverride Example$sugar_config['external_cache_disabled_wincache'] = false;external_cache_force_backend


DescriptionForce given external key/value cache backend. Make sure that the requirements are met and any other cache backend specific configuration is applied.TypeString : Backend typeRange of valuesapc, db, file, memcache, memcached, memory, redis, smash, wincache, and zendVersions6.2.0+ProductsProfessional, EnterpriseDefault ValueemptyOverride Example$sugar_config['external_cache_force_backend'] = 'db';forms
DescriptionAn array defining form requirements.TypeArrayVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['forms'] = array();forms.requireFirst


DescriptionPresents all required fields grouped together in the first panel on the EditView form.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['forms']['requireFirst'] = true;freebusy_use_vcal_cache


DescriptionPrior to Sugar version 7.6, FreeBusy Calendar searches used the vcals table to cache user meeting and call activity for the purpose of determining user availability in for future free time search. As of 7.6, a new design allowed for more accurate free/busy searching that no longer used this cache, but the cache was still being written to, by default, when calls/meetings were created/updated for backward compatibility reasons. As of Sugar 7.9, in order to enhance performance, the cache is no longer being written to by default.  Instead, the override variable 'FreeBusyCache_Enabled' must be set to true for the Cache to be written.  Since this cache is no longer used inside the Sugar application, this option should be used with caution as the cache itself is expected to be removed from the Sugar product in a future release.TypeBooleanRange of valuestrue and


removed from the Sugar product in a future release.TypeBooleanRange of valuestrue and falseVersions6.1.0RC1+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['freebusy_use_vcal_cache'] = true;freezeListHeaders


DescriptionGlobal admin config that turns the frozen headers on/off. By default, most list views now have frozen headers and a static pagination element at the bottom of the screen. When the setting is turned off (set to false), this will revert to non-frozen headers and a user having to scroll down to see the pagination buttons. This is enforced in almost every list view in Sugar with the exception of some unique list views that do not have pagination controls. Instances running on Sugar's cloud environment will have this setting enforced as true.TypeBooleanVersions12.0.0+ProductsEnterprise, Serve, SellDefault ValuetrueSugarCloud ValuetrueOverride Example$sugar_config['freezeListHeaders'] = false;gs_use_shortcut_operator


DescriptionThe default value of true permits use of shortcut operators in global search. These operators are: '&' for AND, '|' for OR, and '-' for NOT. Setting this to false will disable the shortcut operators in global search and cause these characters to be interpreted as literals.TypeBooleanRange of valuestrue and falseVersions8.3.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuetrueOverride Example$sugar_config['gs_use_shortcut_operator'] = falsehide_admin_licensing


DescriptionHides the License settings subpanel in the administrative panel. Instances running on Sugar's cloud environment will have this setting enforced as false.TypeBooleanRange of valuestrue and falseVersions6.5.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseSugarCloud ValuefalseOverride Example$sugar_config['hide_admin_licensing'] = true;hide_full_text_engine_config
DescriptionDetermines if the FTS settings are present in the admin search page in Admin > Search. Instances running on Sugar's cloud environment will have this setting enforced as true.TypeBooleanRange of valuestrue and falseVersions6.5.15+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseSugarCloud ValuetrueOverride Example$sugar_config['hide_full_text_engine_config'] = true;hide_subpanels


DescriptionThis setting only applies to modules running in Backward Compatibility Mode. When a DetailView is loaded, all subpanels are collapsed. Collapsing subpanels on load increases performance by not querying for data until a user explicitly expands a subpanel.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['hide_subpanels'] = true;hide_subpanels_on_login


DescriptionThis setting only applies to modules running in backward compatibility mode. Collapses subpanels per session. When a DetailView is initially loaded during a session, all subpanels are collapsed. Once explanded, it will remain expanded until the user logs out. Collapsing subpanels on load increases performance by not querying for data until a user explicitly expands a subpanel.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuefalseOverride Example$sugar_config['hide_subpanels_on_login'] = true;hint
DescriptionThe array of configurations related to Hint.TypeArrayVersions10.3.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['hint'] = array();hint.hint_install_target_geo


DescriptionThis optional property allows you to, before installation of Hint, explicitly set which region you would like Hint to connect to, overriding the default behavior of the Hint installer. The default behavior is for Hint to connect to services hosted in the region nearest to that of the Sugar instance on which it is being installed. See the Hint Administration Guide for more details on Hint service regions: https://support.sugarcrm.com/Documentation/Installable_Connectors/Hint/Hint_Installation_Guide/#Choosing_the_Hint_Services_Region
Note: Once configured, it is not possible to modify the region Hint connects to. Switching regions requires completely uninstalling and reinstalling Hint, which will cause you to lose all existing system and end-user settings.


Note: 'APSE' is only available for 12.0 and higher.TypeStringRange of values'US', 'EU', 'APSE'Versions10.3.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellOverride Example$sugar_config['hint']['hint_install_target_geo'] = 'US';history_max_viewed
DescriptionThe number of history items from the tracker to display for a user.TypeIntegerVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault Value50Override Example$GLOBALS['sugar_config']['history_max_viewed'] = 25;host_name


DescriptionSets the host name of the instance, such as the website address or location where the instance is hosted and accessed.TypeString : StringVersions6.5.10+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuelocalhostOverride Example$sugar_config['host_name'] = 'localhost';installer_locked
DescriptionSets whether the installer is locked or not. When false, it is possible to access Sugar's initial configuration page to reinstall the instance. Instances running on Sugar's cloud environment will have this setting enforced as true.TypeBooleanRange of valuestrue and falseVersions5.2.0+ProductsProfessional, Enterprise, Ultimate, Serve, SellDefault ValuetrueSugarCloud ValuetrueOverride Example$sugar_config['installer_locked'] = false;jobs