Newer Version Available
SearchSettings
This type extends the Metadata metadata type and inherits its fullName field.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See Settings for more details.
File Suffix and Directory Location
SearchSettings values are stored in a single file named Search.settings in the settings folder. The .settings files are different from other named components because there is only one settings file for each settings component.
Version
SearchSettings is available in API version 37.0 and later.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| documentContentSearchEnabled | boolean | Indicates if a full-text document search is performed. |
| optimizeSearchForCJKEnabled | boolean | Indicates whether the search is optimized for the Japanese, Chinese, and Korean languages. This setting affects sidebar search and the account search for Find Duplicates on a lead record in sidebar search and global search. Enable this option if users are searching mostly in Japanese, Chinese, or Korean, and if the text in searchable fields is mostly in those languages. |
| recentlyViewedUsersForBlankLookupEnabled | boolean | Indicates whether the list of records that are returned from a user autocomplete lookup and from a blank user lookup is taken from the user’s recently viewed user records. Otherwise this setting is false if the lookup shows a list of recently accessed user records from across your org (false). Only applies to User object blank lookup searches. |
| searchSettingsByObject | SearchSettingsByObject | Represents a list of search settings for each object. |
| sidebarAutoCompleteEnabled | boolean | Indicates if autocomplete is enabled for sidebar search. Autocomplete is when users start typing search terms and sidebar search displays a matching list of recently viewed records. |
| sidebarDropDownListEnabled | boolean | Indicates if a drop-down list appears in the sidebar search section. From this list, users can select to search within tags, within a specific object, or across all objects. |
| sidebarLimitToItemsIOwnCheckboxEnabled | boolean | Indicates if the Limit to Items I Own checkbox appears. The checkbox allows your users to include only records for which they are the record owner when entering search queries in the sidebar. |
| singleSearchResultShortcutEnabled | boolean | Indicates if a shortcut is enabled. With the shortcut, users skip the search results page and go directly to the record’s detail page when their search returns only a single item. This setting doesn't apply to tags, case comments (in advanced search), and global search. |
| spellCorrectKnowledgeSearchEnabled | boolean | Indicates if spell check is enabled for Knowledge search. |
SearchSettingsByObject
Includes ObjectSearchSetting field type, which is a list of search settings for each object.
| Field Name | Field Type | Description |
|---|---|---|
| searchSettingsByObject | ObjectSearchSetting | Contains a list of search settings for each object. |
ObjectSearchSetting
A list of search settings for each object.
| Field Name | Field Type | Description |
|---|---|---|
| enhancedLookupEnabled | boolean | Indicates if enhanced lookups is enabled for the object. |
| lookupAutoCompleteEnabled | boolean | Indicates if autocomplete is enabled for lookup search. Autocomplete is when users edit the lookup field inline by choosing an autosuggestion. |
| name | string | The entity name of the object being configured. |
| resultsPerPageCount | int | The number of search results per page. |
Declarative Metadata Sample Definition
The following is an example of the Search.settings file.
1<?xml version="1.0" encoding="UTF-8"?>
2 <SearchSettings xmlns="http://soap.sforce.com/2006/04/metadata">
3 <documentContentSearchEnabled>true</documentContentSearchEnabled>
4 <optimizeSearchForCJKEnabled>true</optimizeSearchForCJKEnabled>
5 <recentlyViewedUsersForBlankLookupEnabled>true</recentlyViewedUsersForBlankLookupEnabled>
6 <searchSettingsByObject>
7 <searchSettingsByObject>
8 <enhancedLookupEnabled>false</enhancedLookupEnabled>
9 <lookupAutoCompleteEnabled>false</lookupAutoCompleteEnabled>
10 <name>Account</name>
11 <resultsPerPageCount>25</resultsPerPageCount>
12 </searchSettingsByObject>
13 <searchSettingsByObject>
14 <enhancedLookupEnabled>false</enhancedLookupEnabled>
15 <lookupAutoCompleteEnabled>false</lookupAutoCompleteEnabled>
16 <name>Activity</name>
17 <resultsPerPageCount>25</resultsPerPageCount>
18 </searchSettingsByObject>
19 <searchSettingsByObject>
20 <enhancedLookupEnabled>false</enhancedLookupEnabled>
21 <lookupAutoCompleteEnabled>false</lookupAutoCompleteEnabled>
22 <name>Asset</name>
23 <resultsPerPageCount>25</resultsPerPageCount>
24 </searchSettingsByObject>
25 </searchSettingsByObject>
26 <sidebarAutoCompleteEnabled>true</sidebarAutoCompleteEnabled>
27 <sidebarDropDownListEnabled>true</sidebarDropDownListEnabled>
28 <sidebarLimitToItemsIOwnCheckboxEnabled>true</sidebarLimitToItemsIOwnCheckboxEnabled>
29 <singleSearchResultShortcutEnabled>true</singleSearchResultShortcutEnabled>
30 <spellCorrectKnowledgeSearchEnabled>true</spellCorrectKnowledgeSearchEnabled>
31 </SearchSettings>Example Package Manifest
The following is an example package manifest used to deploy or retrieve the Account settings metadata for an organization.
1<?xml version="1.0" encoding="UTF-8"?>
2 <Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>Search</members>
5 <name>Settings</name>
6 </types>
7 <version>37.0</version>
8 </Package>