Newer Version Available

This content describes an older version of this product. View Latest

SearchLayouts

Represents the metadata associated with the Search Layouts for an object. You can customize which fields to display for users in search results, search filter fields, lookup dialogs, and recent record lists on tab home pages. For more information, see ”Customizing Search Layouts” and ”Customizing Search Layouts for Custom Objects” in the Salesforce online help.

Version

Search layouts for custom objects are available in API version 14.0 and later. The ability to modify search layouts for standard objects (except events and tasks) is available in API version 27.0 and later.

Fields

Field Field Type Description
customTabListAdditionalFields string[] The list of fields displayed in the Recent Object Name list view on a tab associated with the object. The name field is mandatory and is always displayed as the first column header, so it is not included in this list; all additional fields are included. The field name relative to the object name, for example MyCustomField__c, is specified for each custom field.
excludedStandardButtons string[] The list of standard buttons excluded from the search layout.
listViewButtons string[] The list of buttons available in list views for an object.

This field is equivalent to the Buttons Displayed value in the Object Name List View in the Search Layouts related list on the object detail page in the Salesforce user interface. For more information, see “Lookup Dialog Search” in the Salesforce online help.

lookupDialogsAdditionalFields string[] The list of fields displayed in a lookup dialog for the object. The name field is mandatory and is always displayed as the first column header, so it is not included in this list; all additional fields are included. The field name relative to the object name, for example MyCustomField__c, is specified for each custom field.

Salesforce objects often include one or more lookup fields that allow users to associate two records together in a relationship. For example, a contact record includes an Account lookup field that represents the relationship between the contact and the organization with which the contact is associated. A lookup search dialog helps you search for the record associated with the one being edited. Lookup filter fields allow you to filter your lookup search by a customized list of fields in the object.

This field is equivalent to the Lookup Dialogs in the Search Layouts related list on the object detail page in the application user interface. For more information, see “Lookup Dialog Search” in the Salesforce online help.

lookupFilterFields string[] The list of fields that can be used to filter enhanced lookups for an object. Enhanced lookups are optionally enabled by your administrator. The field name relative to the object name, for example MyCustomField__c, is specified for each custom field.

This field is equivalent to the Lookup Filter Fields in the Search Layouts related list on the object detail page in the application user interface. For more information, see “Lookup Dialog Search” in the Salesforce online help.

lookupPhoneDialogsAdditionalFields string[] The list of phone-related fields displayed in a lookup dialog for the object. The name field is mandatory and is always displayed as the first column header, so it is not included in this list; all additional fields are included. The field name relative to the object name, for example MyCustomField__c, is specified for each custom field.

This list enables integration of the fields with a SoftPhone dial pad. For more information, see “About CTI 1.0 and 2.0 SoftPhones” in the Salesforce online help.

This field is equivalent to the Lookup Phone Dialogs in the Search Layouts related list on the object detail page in the application user interface.

searchFilterFields string[] The list of fields that can be used to filter a search for the object. The field name relative to the object name, for example MyCustomField__c, is specified for each custom field.

This field is equivalent to the Search Filter Fields in the Search Layouts related list on the object detail page in the application user interface.

searchResultsAdditionalFields string[] The list of fields displayed in a search result for the object. The name field is mandatory and is always displayed as the first column header, so it is not included in this list; all additional fields are included. The field name relative to the object name, for example MyCustomField__c, is specified for each custom field.

This field is equivalent to the Search Results in the Search Layouts related list on the object detail page in the application user interface.

searchResultsCustomButtons string[] The list of custom buttons available in a search result for the object. The actions associated with the buttons can be applied to any of the records returned in the search result.

Declarative Metadata Sample Definition

A sample definition of search layouts in an object is shown below.

1<?xml version="1.0" encoding="UTF-8"?>
2<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
3. . .
4    <searchLayouts>
5        <listViewButtons>New</listViewButtons>
6        <listViewButtons>Accept</listViewButtons>
7        <listViewButtons>ChangeOwner</listViewButtons>
8        <lookupDialogsAdditionalFields>firstQuote__c</lookupDialogsAdditionalFields>
9        <lookupDialogsAdditionalFields>finalQuote__c</lookupDialogsAdditionalFields>
10        <searchResultsAdditionalFields>CREATEDBY_USER</searchResultsAdditionalFields>
11     </searchLayouts>
12. . .
13</CustomObject>