OrgPreferenceSettings
This type extends the Metadata metadata type and inherits its fullName field.
File Suffix and Directory Location
OrgPreferenceSettings values are stored in the OrgPreference.settings file in the settings directory. The .settings files are different from other named components because there is only one settings file for each settings component.
Version
OrgPreferenceSettings components are available in API versions 37.0 to 47.0.
OrgPreferenceSettings is deprecated in API version 47.0 and removed in API version 48.0. In API version 47.0, most of the settings supported in the preferences field were made available in the form of Boolean fields on other Settings types. For example, in API version 47.0 and later, you can enable and disable the CompileOnDeploy preference by using the enableCompileOnDeploy field on the ApexSettings type.
Fields
Field Name | Field Type | Description |
---|---|---|
preferences | OrganizationSettingsDetail[] | The preferences associated with the org settings. In the
following list of preferences, click hyperlinked preference names to
go to the topic for the Settings type that contains that preference.
If there is no link, the preference hasn’t been moved to another
Settings type.
|
OrganizationSettingsDetail
Field Name | Field Type | Description |
---|---|---|
settingName | string | The name of the setting. For example, “S1EncryptedStoragePref2.” |
settingValue | boolean | Indicates whether the setting is enabled (true) or not (false). |
Declarative Metadata Sample Definition
The following is an example of a OrgPreferenceSettings component. The example shows only the preferences values that are supported but not yet available as fields on another Settings type in API version 47.0.
<?xml version="1.0" encoding="UTF-8"?>
<OrgPreferenceSettings xmlns="http://soap.sforce.com/2006/04/metadata">
<preferences>
<settingName>AnalyticsSharingEnable</settingName>
<settingValue>true</settingValue>
</preferences>
<preferences>
<settingName>NetworksEnabled</settingName>
<settingValue>true</settingValue>
</preferences>
<preferences>
<settingName>NotesReservedPref01</settingName>
<settingValue>false</settingValue>
</preferences>
<preferences>
<settingName>ScratchOrgManagementPref</settingName>
<settingValue>true</settingValue>
</preferences>
<preferences>
<settingName>VoiceEnabled</settingName>
<settingValue>false</settingValue>
</preferences>
</OrgPreferenceSettings>
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.