Newer Version Available
ApexSettings
In the package manifest, all organization settings metadata types are accessed using the Settings name. See Settings for details.
File Suffix and Directory Location
ApexSettings values are stored in the Apex.settings file in the settings directory of the corresponding package directory. The .settings files are different from other named components, because there’s only one settings file for each settings component.
Version
ApexSettings components are available in API version 47.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| enableAggregateCodeCoverageOnly | boolean | Indicates whether aggregate (not detailed) totals are tracked for Apex test coverage data (true) or not (false). The default value is false. |
| enableApexAccessRightsPref | boolean | Deprecated. |
| enableApexApprovalLockUnlock | boolean | Indicates whether approval process lock and unlock operations from Apex code are allowed (true) or not (false). The default value is false. |
| enableApexCtrlImplicitWithSharingPref | boolean | Indicates whether the Use with sharing for @AuraEnabled Apex Controllers with Implicit Sharing critical update is activated (true) or not (false). For more details, see the Winter ’20 Release Notes. |
| enableApexPropertyGetterPref | boolean | Indicates whether the Enforce Access Modifiers on Apex Properties in Lightning Component Markup critical update is activated (true) or not (false). For more details, see the Winter ’20 Release Notes. |
| enableAuraApexCtrlAuthUserAccessCheckPref | boolean | Indicates whether the Restrict Access to @AuraEnabled Apex Methods for Authenticated Users Based on User Profile critical update is activated (true) or not (false). For more details, see the Winter ’20 Release Notes. |
| enableAuraApexCtrlGuestUserAccessCheckPref | boolean | Indicates whether the Restrict Access to @AuraEnabled Apex Methods for Guest and Portal Users Based on User Profile critical update is activated (true) or not (false). For more details, see the Winter ’20 Release Notes. |
| enableCompileOnDeploy | boolean | Indicates whether Apex code is automatically recompiled (true) or not (false). When set to true, code is recompiled before completing a metadata deployment, change set deployment, package installation, or package upgrade. The default value is true for production orgs and false for others. |
| enableDisableParallelApexTesting | boolean | Indicates whether Apex tests are serially executed (true) or not (false). The default value is false. |
| enableDoNotEmailDebugLog | boolean | Indicates whether Apex debug log details are suppressed in unhandled exception emails (true) or not (false). The default value is false. |
| enableGaplessTestAutoNum | boolean | Indicates whether autonumbering gaps are prevented by Apex test executions not incrementing autonumber fields for non-test records (true) or not (false). The default value is true. |
| enableMngdCtrlActionAccessPref | boolean | Indicates whether the Disable Access to Non-global Apex Controller Methods in Managed Packages critical update is activated (true) or not (false). For more details, see the Winter ’20 Release Notes. |
| enableNonCertifiedApexMdCrud | boolean | Indicates whether Apex classes can access metadata, public or protected, through classes in the Metadata namespace (true) or not (false). The default value is false. |
| enableSecureNoArgConstructorPref | boolean | Indicates whether Apex type visibility rules are strictly enforced for the Type.newInstance method (true) or not (false). The default value is false. When enabled, regardless of API version, you can instantiate only Apex classes with a no-arguments constructor that is visible to the code running Type.newInstance. Available in API version 48.0 and later. |
Declarative Metadata Sample Definition
The following is an example of ApexSettings components.
1<?xml version="1.0" encoding="UTF-8"?>
2<ApexSettings xmlns="http://soap.sforce.com/2006/04/metadata">
3 <enableDoNotEmailDebugLog>true</enableDoNotEmailDebugLog>
4 <enableDisableParallelApexTesting>true</enableDisableParallelApexTesting>
5</ApexSettings>The following is an example package.xml manifest that references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>Apex</members>
5 <name>Settings</name>
6 </types>
7 <version>47.0</version>
8</Package>Wildcard Support in the Manifest File
The wildcard character * (asterisk) in the package.xml manifest file doesn’t apply to metadata types for feature settings. The wildcard applies only when retrieving all settings, not for an individual setting. For details, see Settings. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.