Newer Version Available
ProfileSearchLayouts
Represents a user profile’s search results layouts
for an object. ProfileSearchLayouts are similar to
SearchLayouts. However, with profile-specific layouts, each
user profile can have a different search results layout for an object.
File Suffix and Directory Location
Profile search layouts are defined as part of a standard or custom object. SearchLayout is the default search results layout used when no layout is specified for a user profile. For more information, see CustomObject.
Version
Profile search layouts for custom objects are available in API version 48.0 and later.
Fields
| Field | Field Type | Description |
|---|---|---|
| profileName | string[] | The name of the profile associated with a customized search results layout. The profile name can be a standard Salesforce profile or custom profile defined in your org. |
| fields | string[] | The list of fields displayed in search results for the object and for the users that have the profile Profile Name. The name field is required and is always displayed as the first column header, so it isn’t included in this list. All additional fields are included. The field name relative to the object name, for exampleMyCustomField__c, is specified for each custom field. |
Declarative Metadata Sample Definition
The following shows a sample definition of profile-specific search layouts in an object.
1<?xml version="1.0" encoding="UTF-8"?>
2 <CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
3 . . .
4 <profileSearchLayouts>
5 <fields>ACCOUNT.NAME</fields>
6 <fields>ACCOUNT.SITE</fields>
7 <fields>ACCOUNT.PHONE1</fields>
8 <fields>CORE.USERS.ALIAS</fields>
9 <fields>ACCOUNT.ADDRESS2_CITY</fields>
10 <profileName>System Administrator</profileName>
11 </profileSearchLayouts>
12 <profileSearchLayouts>
13 <fields>ACCOUNT.NAME</fields>
14 <fields>ACCOUNT.SITE</fields>
15 <profileName>WDC Only User</profileName>
16 </profileSearchLayouts>
17 . . .
18 </CustomObject>