SearchCustomization
Parent Type
File Suffix and Directory Location
SearchCustomization components have the suffix .searchCustomization and are stored in the searchCustomizations folder.
Version
SearchCustomization components are available in API version 61.0 and later.
Special Access Rules
Only users with the View Setup and Configuration permission can access this object, and only users with the Customize Application permission can edit it.
Fields
| Field Name | Description |
|---|---|
| channel |
|
| masterLabel |
|
| objectOverride |
|
| objectToAlwaysSearch |
|
| profile |
|
| selectedObject |
|
| selectedProfile |
|
SearchCustomizationObjectOverride
Represents the configuration for a specific object.
| Field Name | Description |
|---|---|
| fieldOverride |
|
| objectApiName |
|
| rule |
|
| searchable |
|
SearchCustomizationFieldOverride
Represents the configuration for a specific field within an object.
| Field Name | Description |
|---|---|
| fieldApiName |
|
| searchable |
|
SearchCustomizationRule
Represents the rules defined in an object to filter search results.
| Field Name | Description |
|---|---|
| fieldApiName |
|
| operator |
|
| ruleValue |
|
SearchCustomizationRuleValue
Represents the value of a rule used to filter search results.
| Field Name | Description |
|---|---|
| targetObjectApiName |
|
| value |
|
Declarative Metadata Sample Definition
The following is an example of a SearchCustomization component.
1<?xml version="1.0" encoding="UTF-8"?>
2<SearchCustomization xmlns="http://soap.sforce.com/2006/04/metadata">
3 <channel>GlobalSearch</channel>
4 <masterLabel>My_Standard_User_Configuration</masterLabel>
5 <objectOverride>
6 <fieldOverride>
7 <fieldApiName>Description</fieldApiName>
8 <searchable>false</searchable>
9 </fieldOverride>
10 <fieldOverride>
11 <fieldApiName>Rating</fieldApiName>
12 <searchable>true</searchable>
13 </fieldOverride>
14 <objectApiName>Account</objectApiName>
15 <rule>
16 <fieldApiName>My_Custom_Field__c</fieldApiName>
17 <operator>ne</operator>
18 <ruleValue>
19 <value>Other</value>
20 </ruleValue>
21 </rule>
22 <rule>
23 <fieldApiName>Rating</fieldApiName>
24 <operator>in</operator>
25 <ruleValue>
26 <value>Hot</value>
27 </ruleValue>
28 <ruleValue>
29 <value>Warm</value>
30 </ruleValue>
31 </rule>
32 </objectOverride>
33 <objectOverride>
34 <objectApiName>Asset</objectApiName>
35 <searchable>false</searchable>
36 </objectOverride>
37 <objectOverride>
38 <objectApiName>Contact</objectApiName>
39 <rule>
40 <fieldApiName>AccountId</fieldApiName>
41 <operator>ne</operator>
42 <ruleValue>
43 <targetObjectApiName>Account</targetObjectApiName>
44 <value>A Company</value>
45 </ruleValue>
46 </rule>
47 <rule>
48 <fieldApiName>DoNotCall</fieldApiName>
49 <operator>eq</operator>
50 <ruleValue>
51 <value>false</value>
52 </ruleValue>
53 </rule>
54 </objectOverride>
55 <objectToAlwaysSearch>Account</objectToAlwaysSearch>
56 <objectToAlwaysSearch>Contact</objectToAlwaysSearch>
57 <objectToAlwaysSearch>My_Custom_Object__c</objectToAlwaysSearch>
58 <objectToAlwaysSearch>Product2</objectToAlwaysSearch>
59 <profile>standard</profile>
60</SearchCustomization>The following is an example package.xml 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>*</members>
5 <name>SearchCustomization</name>
6 </types>
7 <version>61.0</version>
8</Package>Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.