No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Layout
Represents the metadata associated with a page layout. For more information, see “Managing Page Layouts” in the Salesforce online help. It extends the Metadata metadata type and inherits its fullName field.
File Suffix and Directory Location
Layouts are stored in the layouts directory of the corresponding package directory. The extension is .layout.
Version
Layouts are available in API version 13.0 and later.
Fields
This metadata type represents the valid values that define a page layout:
| Field Name | Field Type | Description |
|---|---|---|
| customButtons | string[] | The custom buttons for this layout. Each button is a reference to a Weblink on the same object. For example, a ButtonLink refers to a Weblink on the same standard or custom object named 'ButtonLink'. |
| customConsoleComponents | CustomConsoleComponents | Represents custom console components (Visualforce pages or lookup fields; Force.com Canvas apps not available) on a page layout. Custom console components only display in the Salesforce console. |
| emailDefault | boolean | Only relevant if showEmailCheckbox is set; indicates the default value of that checkbox. |
| excludeButtons | string[] | List of standard buttons to exclude from this layout. For example, <excludeButtons>Delete</excludeButtons>, will exclude the Delete button from this layout. |
| feedLayout | FeedLayout | Represents the values that define the feed view of a feed-based page layout. Feed-based layouts are available on Account, Case, Contact, Lead, Opportunity, and custom objects. They include a feed view and a detail view. |
| headers | LayoutHeader[] (enumeration of type string) | Layout headers are currently only used for tagging, and only
appear in the UI if tagging is enabled. For more information, see
“Tags Overview” in the Salesforce online
help. Valid string values are:
|
| layoutSections | LayoutSection[] | The main sections of the layout containing fields, s-controls, and custom links. The order here determines the layout order. |
| miniLayout | MiniLayout | A mini layout is used in the mini view of a record in the Console tab, hover details, and event overlays. |
| multilineLayoutFields | string[] | Fields for the special multiline layout fields which appear in OpportunityProduct layouts. These are otherwise similar to miniLayoutFields miniLayout. |
| quickActionList | QuickActionList | The list of actions associated with the page layout. This field is available in API version 28.0 and later. |
| RelatedContent | The Related Content section of the page layout. This field is available in API version 29.0 and later. | |
| relatedLists | RelatedListItem[] | The related lists for the layout, listed in the order they appear in the user interface. |
| relatedObjects | string[] | The list of related objects that appears in the mini view of the console. In database terms, these are foreign key fields on the object for the layout. For more information, see “Choosing Related Objects for the Agent Console's Mini View” in the Salesforce online help. |
| runAssignmentRulesDefault | boolean | Only relevant if showRunAssignmentRulesCheckbox is set; indicates the default value of that checkbox. |
| showEmailCheckbox | boolean | Only allowed on Case, CaseClose, and Task layouts. If set, a checkbox appears to show email. |
| showHighlightsPanel | boolean | If set, the highlights panel displays on pages in the Salesforce console. This field is available in API version 22.0 and later. |
| showInteractionLogPanel | boolean | If set, the interaction log displays on pages in the Salesforce console. This field is available in API version 22.0 and later. |
| showKnowledgeComponent | boolean | Only allowed on Case layouts. If set, the Knowledge sidebar displays on cases in the Salesforce console. This field is available in API version 20.0 and later. |
| showRunAssignmentRulesCheckbox | boolean | Only allowed on Lead and Case objects. If set, a checkbox appears on the page to show assignment rules. |
| showSolutionSection | boolean | Only allowed on CaseClose layout. If set, the built-in solution information section shows up on the page. |
| showSubmitAndAttachButton | boolean | Only allowed on Case layout. If set, the Submit & Add Attachment button displays on case edit pages to portal users in the Customer Portal. |
CustomConsoleComponents
Represents custom console components (Visualforce pages or lookup fields; Force.com Canvas apps not available) on a page layout. Custom console components only display in the Salesforce console. Available in API version 25.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| primaryTabComponents | PrimaryTabComponents | Represents custom console components on primary tabs in the Salesforce console. Available in API version 25.0 and later. |
| subtabComponents | SubtabComponents | Represents custom console components on subtabs in the Salesforce console. Available in API version 25.0 and later. |
PrimaryTabComponents
Represents custom console components on primary tabs in the Salesforce console. Available in API version 25.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| component | ConsoleComponent[] | Represents a custom console component (Visualforce page or lookup field; Force.com Canvas apps not available) on a section of a page layout. Custom console components only display in the Salesforce console. This field is available in API version 29.0 and earlier. |
| containers | Container[] | Represents a location and style in which to display more than one custom console component on the sidebars of the Salesforce console. You can specify up to five components for each of the four locations (left, right, top, and bottom). This field is available in API version 30.0 and later. |
ConsoleComponent
Represents a custom console component (Visualforce page or lookup field; Force.com Canvas apps not available) on a section of a page layout. Custom console components only display in the Salesforce console. Available in API version 25.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| height | int | Required for components with a location of top or bottom. The height of the custom console component. The value must be specified in pixels and be greater than 0 but less than 999. |
| location | string | Required. The location of the custom console component on the page layout. Valid values are right, left, top, and bottom. A component can have one location for each page layout. |
| visualforcePage | string | Required. The unique name of the custom console component. For example, ConsoleComponentPage. |
| width | int | Required for components with a location of left or right. The width of the custom console component. The value must be specified in pixels and be greater than 0 but less than 999. |
Container
Represents a location and style in which to display more than one custom console component in the sidebars of the Salesforce console. For example, you can display multiple components in the right sidebar of the console with a style of either stack, tabs, or accordion. Available in API version 30.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| height | int | Required for components with a location of top or bottom. The height of the components’ container. The unit of measurement, in pixels or percent, is determined by the unit field. |
| region | string | Required. The location of the components’ container.
Valid values include:
|
| sidebarComponent | SidebarComponent[] | Represents a specific custom console component to display in the components’ container. |
| style | string | Required. The style of the container in which to display multiple
components. Valid values include:
|
| unit | string | Required. The unit of measurement, in pixels or percent, for
the height or width of the components’ container. Pixel values are simply the number of pixels, for example, 500, and must be greater than 0 but less than 999. Percentage values must include the percent sign, for example, 20%, and must be greater than 0 but less than 100. |
| width | int | Required for components with a location of right or left. The width of the components’ container. The unit of measurement, in pixels or percent, is determined by the unit field. |
SidebarComponent
Represents a specific custom console component to display in a container that hosts multiple components in one of the sidebars of the Salesforce console. You can specify up to five components for each of the four container locations (left, right, top, and bottom). Available in API version 30.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| height | int | Required for components with a location of top or bottom. The height of the component in the container. The unit of measurement, in pixels or percent, is determined by the unit field. |
| label | string | The name of the component as it displays to console users. Available for components in a container with the style of tabs or accordion. |
| lookup | string | If the component is a lookup field, the name of the field. |
| page | string | If the component is a Visualforce page, the name of the Visualforce page. |
| unit | string | Required. The unit of measurement, in pixels or percent, for
the height or width of the component in the container. Pixel values are simply the number of pixels, for example, 500, and must be greater than 0 but less than 999. Percentage values must include the percent sign, for example, 20%, and must be greater than 0 but less than 100. |
| width | int | Required for components with a location of right or left. The width of the component in the container. The unit of measurement, in pixels or percent, is determined by the unit field. |
SubtabComponents
Represents custom console components on subtabs in the Salesforce console. Available in API version 25.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| component | ConsoleComponent[] | Represents a custom console component (Visualforce page or lookup field; Force.com Canvas apps not available) on a section of a page layout. Custom console components only display in the Salesforce console. This field is available in API version 29.0 and earlier. |
| containers | Container[] | Represents a location and style in which to display more than one custom console component on the sidebars of the Salesforce console. You can specify up to five components for each of the four locations (left, right, top, and bottom). This field is available in API version 30.0 and later. |
FeedLayout
Represents the values that define the feed view of a feed-based page layout. Feed-based layouts are available on Account, Case, Contact, Lead, Opportunity, and custom objects. They include a feed view and a detail view. Available in API version 30.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| feedFilterPosition | FeedLayoutFilterPosition (enumeration of type string) | Where the feed filters list is included in the layout. Valid
values are:
|
| feedFilters | FeedLayoutFilter[] | The individual filters displayed in the feed filters list. |
| hideSidebar | boolean | Specifies whether the sidebar is hidden (true) or not (false). |
| leftComponents | FeedLayoutComponent[] | The individual components displayed in the left column of the feed view. |
| rightComponents | FeedLayoutComponent[] | The individual components displayed in the right column of the feed view. |
FeedLayoutComponent
Represents a component in the feed view of a feed-based page layout. Available in API version 30.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| componentType | FeedLayoutComponentType (enumeration of type string) | Required. The type of component. Valid values are:
|
| height | int | The height, in pixels, of the component. Doesn’t apply to standardComponents |
| page | string | The name of a Visualforce page being used as a custom component. |
FeedLayoutFilter
Represents a feed filter option in the feed view of a feed-based page layout. A filter must have only standardFilter or feedItemType set. Available in API version 30.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| feedFilterType | FeedLayoutFilterType (enumeration of type string) | The type of filter. Valid values are:
|
| FeedItemType | string | The type of feed item to display. Valid values are:
|
MiniLayout
Represents a mini view of a record in the Console tab, hover details, and event overlays.
| Field Name | Field Type | Description |
|---|---|---|
| fields | string[] | The fields for the mini-layout, listed in the order they appear in the UI. Fields that appear here must appear in the main layout. |
| relatedLists | RelatedListItem[] | The mini related list, listed in the order they appear in the UI. You cannot set sorting on mini related lists. Fields that appear here must appear in the main layout. |
LayoutSection
LayoutSection represents a section of a page layout, such as the Custom Links section.
| Field Name | Field Type | Description |
|---|---|---|
| customLabel | boolean | Indicates if this section's label is custom or standard (built-in). Custom labels can be any text, but must be translated. Standard labels have a predefined set of valid values, for example 'System Information', which are automatically translated. |
| detailHeading | boolean | Controls if this section appears in the detail page. In the UI, this setting corresponds to the checkbox in the section details dialog. |
| editHeading | boolean | Controls if this section appears in the edit page. |
| label | string | The label; either standard or custom, based on the customLabel flag. |
| layoutColumns | LayoutColumn[] | The columns of the layout, depending on the style. There may be 1, 2, or 3 columns, ordered left to right. |
| style | LayoutSectionStyle (enumeration of type string) | The style of the layout:
|
| summaryLayout | SummaryLayout | Reserved for future use. |
LayoutColumn
LayoutColumn represents the items in a column within a layout section.
| Field Name | Field Type | Description |
|---|---|---|
| layoutItems | LayoutItem[] | The individual items within a column (ordered from top to bottom). |
| reserved | string | This field is reserved for Salesforce. The field resolves an issue with some SOAP libraries. Any value entered in the field is ignored. |
LayoutItem
LayoutItem represents the valid values that define a layout item. An item must have only one of the following set: component, customLink, field, scontrol, page, reportChartComponent.
| Field Name | Field Type | Description |
|---|---|---|
| behavior | UiBehavior (enumeration of type string) | Determines the field behavior. Valid string values:
|
| component | string | Reference to a component. Value must be sfa:socialCard. This field is available in API version 30.0 and later. This is only allowed inside a RelatedContentItem. sfa:socialCard is only supported on page layouts for contacts, accounts, and leads. |
| customLink | string | The customLink reference. This is only allowed inside a CustomLink layoutSection. |
| emptySpace | boolean | Controls if this layout item is a blank space. |
| field | string | The field name reference, relative to the layout object, for example Description or MyField__c. |
| height | int | For s-control and pages only, the height in pixels. |
| page | string | Reference to a Visualforce page. |
| reportChartComponent | ReportChartComponentLayoutItem | Refers to a report chart that you can add to a standard or custom object page. |
| scontrol | string | Reference to an s-control. |
| showLabel | boolean | For s-control and pages only, whether or not to show the label. |
| showScrollbars | boolean | For s-control and pages only, whether or not to show scrollbars. |
| width | string | For s-control and pages only, the width in pixels or percent. Pixel values are simply the number of pixels, for example, 500. Percentage values must include the percent sign, for example, 20%. |
ReportChartComponentLayoutItem
Represents the settings for a report chart on a standard or custom page.
| Field Name | Field Type | Description |
|---|---|---|
| contextFilterableField | string | Unique development name of the field by which a report chart is filtered to return data relevant to the page. If set, chart data is filtered by the ID field for the parent object of the page or report type. The parent object for the report type and the page must match for a chart to return relevant data. |
| includeContext | boolean | If true, filters the report chart to return data that’s relevant to the page. |
| reportName | string | Unique development name of a report that includes a chart. |
| showTitle | boolean | If true, applies the title from the report to the chart. |
| size | ReportChartComponentSize (enumeration of type string) |
The chart size is medium when no value is specified. Valid
values:
|
QuickActionList
QuickActionList represents the list of actions associated with the page layout. Available in API version 28.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| quickActionListItems | QuickActionListItem[] | Array of zero or more QuickActionList objects. |
QuickActionListItem
QuickActionListItem represents an action in the QuickActionList. Available in API version 28.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| quickActionName | string | The API name of the action. |
RelatedContent
RelatedContent represents the Mobile Cards section of the page layout. Available in API version 29.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| relatedContentItems | RelatedContentItem[] | A list of layout items in the Mobile Cards section of the page layout. |
RelatedContentItem
RelatedContentItem represents an individual item in the RelatedContentItem list. Available in API version 29.0 and later.
| Field Name | Field Type | Description |
|---|---|---|
| layoutItem | LayoutItem | An individual LayoutItem in the Mobile Cards section. |
RelatedListItem
RelatedListItem represents a related list in a page layout.
| Field Name | Field Type | Description |
|---|---|---|
| customButtons | string[] | A list of custom buttons used in the related list. For more information, see “Defining Custom Buttons and Links” in the Salesforce online help. |
| excludeButtons | string[] | A list of excluded related-list buttons. |
| fields | string[] | A list of fields displayed in the related list. Retrieval of standard fields on related lists uses aliases instead of field or API names. For example, the Fax, Mobile, and Home Phone fields are retrieved as Phone2, Phone3, and Phone4, respectively. |
| relatedList | string | Required. The name of the related list. |
| sortField | string | The name of the field that is used for sorting. |
| sortOrder | SortOrder (enumeration of type string) | If the sortField is set, the sortOrder field determines the sort order.
|
SummaryLayout
| Field Name | Field Type | Description |
|---|---|---|
| masterLabel | string | Required. The name of the layout label. |
| sizeX | int | Required. Number of columns in the highlights panel. This must be between 1 and 4 (inclusive). |
| sizeY | int | Required. Number of rows in each column. This must be either 1 or 2. |
| sizeZ | int | Reserved for future use. If provided, the setting is not visible to users. |
| summaryLayoutItems | SummaryLayoutItem[] | Controls the appearance of an indvididual field and its column and row position within the highlights panel grid, when Case Feed is enabled. At least one is required. |
| summaryLayoutStyle | SummaryLayoutStyle (enumeration of type string) | Highlights panel style. Valid string values are:
|
SummaryLayoutItem
| Field Name | Field Type | Description |
|---|---|---|
| customLink | string | If the item is a custom link, this is the customLink reference. |
| field | string | The field name reference, relative to the page layout. Must be a standard or custom field that also exists on the detail page. |
| posX | int | Required. The item's column position in the highlights panel grid. Must be within the range of sizeX. |
| posY | int | Required. The item's row position in the highlights panel grid. Must be within the range of sizeY. |
| posZ | int | Reserved for future use. If provided, the setting is not visible to users. |
Declarative Metadata Sample Definition
1<?xml version="1.0" encoding="UTF-8"?>
2<Layout xmlns="http://soap.sforce.com/2006/04/metadata">
3 <customConsoleComponents>
4 <primaryTabComponents>
5 <container>
6 <region>left</region>
7 <style>Stack</style>
8 <unit>Pixel</unit>
9 <width>101</width>
10 <sidebarComponent>
11 <width>60</width>
12 <page>simplepage1</page>
13 <unit>Percentage</unit>
14 </sidebarComponent>
15 <sidebarComponent>
16 <width>40</width>
17 <page>Hello_World</page>
18 <unit>Percentage</unit>
19 </sidebarComponent>
20 </container>
21 </primaryTabComponents>
22 <subtabComponents>
23 <component>
24 <location>top</location>
25 <visualforcePage>ConsoleComponentPage2</visualforcePage>
26 <height>200</height>
27 </component>
28 </subtabComponents>
29 </customConsoleComponents>
30 <customButtons>ButtonLink</customButtons>
31 <layoutSections>
32 <editHeading>true</editHeading>
33 <label>Information</label>
34 <layoutColumns>
35 <layoutItems>
36 <behavior>Required</behavior>
37 <field>Name</field>
38 </layoutItems>
39 <layoutItems>
40 <height>180</height>
41 <scontrol>LayoutSControl</scontrol>
42 <showLabel>true</showLabel>
43 <showScrollbars>true</showScrollbars>
44 <width>50%</width>
45 </layoutItems>
46 <layoutItems>
47 <reportChartComponent>
48 <contextFilterableField>CUST_ID</contextFilterableField>
49 <includeContext>true</includeContext>
50 <reportName>Open_Accounts_by_Cases</reportName>
51 <showTitle>false</showTitle>
52 <size>LARGE</size>
53 <reportChartComponent>
54 </layoutItems>
55 </layoutColumns>
56 <layoutColumns>
57 <layoutItems>
58 <behavior>Edit</behavior>
59 <field>OwnerId</field>
60 </layoutItems>
61 <layoutItems>
62 <behavior>Edit</behavior>
63 <field>CurrencyIsoCode</field>
64 </layoutItems>
65 </layoutColumns>
66 <style>TwoColumnsTopToBottom</style>
67 </layoutSections>
68 <layoutSections>
69 <editHeading>true</editHeading>
70 <label>System Information</label>
71 <layoutColumns>
72 <layoutItems>
73 <behavior>Readonly</behavior>
74 <field>CreatedById</field>
75 </layoutItems>
76 <layoutItems>
77 <behavior>Readonly</behavior>
78 <field>Alpha1__c</field>
79 </layoutItems>
80 </layoutColumns>
81 <layoutColumns>
82 <layoutItems>
83 <behavior>Readonly</behavior>
84 <field>LastModifiedById</field>
85 </layoutItems>
86 <layoutItems>
87 <behavior>Edit</behavior>
88 <field>TextArea__c</field>
89 </layoutItems>
90 </layoutColumns>
91 <style>TwoColumnsTopToBottom</style>
92 </layoutSections>
93 <layoutSections>
94 <customLabel>true</customLabel>
95 <detailHeading>true</detailHeading>
96 <label>Custom Links</label>
97 <layoutColumns>
98 <layoutItems>
99 <customLink>CustomWebLink</customLink>
100 </layoutItems>
101 </layoutColumns>
102 <style>CustomLinks</style>
103 </layoutSections>
104 <relatedContent>
105 <relatedContentItems>
106 <layoutItem>
107 <component>sfa:socialPanel</component>
108 </layoutItem>
109 <relatedContentItems>
110 </relatedContent>
111 <miniLayoutFields>Name</miniLayoutFields>
112 <miniLayoutFields>OwnerId</miniLayoutFields>
113 <miniLayoutFields>CurrencyIsoCode</miniLayoutFields>
114 <miniLayoutFields>Alpha1__c</miniLayoutFields>
115 <miniLayoutFields>TextArea__c</miniLayoutFields>
116 <miniRelatedLists>
117 <relatedList>RelatedNoteList</relatedList>
118 </miniRelatedLists>
119 <relatedLists>
120 <fields>StepStatus</fields>
121 <fields>CreatedDate</fields>
122 <fields>OriginalActor</fields>
123 <fields>Actor</fields>
124 <fields>Comments</fields>
125 <fields>Actor.Alias</fields>
126 <fields>OriginalActor.Alias</fields>
127 <relatedList>RelatedProcessHistoryList</relatedList>
128 </relatedLists>
129 <relatedLists>
130 <relatedList>RelatedNoteList</relatedList>
131 </relatedLists>
132</Layout>1<?xml version="1.0" encoding="UTF-8"?>
2<Layout xmlns="http://soap.sforce.com/2006/04/metadata">
3 <layoutSections>
4 <editHeading>true</editHeading>
5 <label>System Information</label>
6 <layoutColumns>
7 <layoutItems>
8 <behavior>Readonly</behavior>
9 <field>CreatedById</field>
10 </layoutItems>
11 <layoutItems>
12 <behavior>Required</behavior>
13 <field>Name</field>
14 </layoutItems>
15 </layoutColumns>
16 <layoutColumns>
17 <layoutItems>
18 <behavior>Readonly</behavior>
19 <field>LastModifiedById</field>
20 </layoutItems>
21 </layoutColumns>
22 <style>TwoColumnsTopToBottom</style>
23 </layoutSections>
24 <summaryLayout>
25 <masterLabel>Great Name</masterLabel>
26 <sizeX>4</sizeX>
27 <sizeY>2</sizeY>
28 <summaryLayoutItems>
29 <posX>0</posX>
30 <posY>0</posY>
31 <field>Name</field>
32 </summaryLayoutItems>
33 </summaryLayout>
34</Layout>1<Layout>
2...
3 <feedLayout>
4 <leftComponents>
5 <componentType>customLinks</componentType>
6 </leftComponents>
7 <rightComponents>
8 <componentType>follow</componentType>
9 </rightComponents>
10 <rightComponents>
11 <componentType>followers</componentType>
12 </rightComponents>
13 <rightComponents>
14 <componentType>visualforce</componentType>
15 <page>accountCustomWidget</page>
16 <height>200</height>
17 </rightComponents>
18 <hideSidebar>true</hideSidebar>
19 <feedFilterPosition>centerDropDown</feedFilterPosition>
20 <feedFilters>
21 <feedFilerType>allUpdates</feedFilerType>
22 </feedFilters>
23 <feedFilters>
24 <feedFilerType>feedItemType</feedFilerType>
25 <feedItemType>CallLogPost</feedItemType>
26 </feedFilters>
27 <feedFilters>
28 <feedFilerType>feedItemType</feedFilerType>
29 <feedItemType>TextPost</feedItemType>
30 </feedFilters>
31 </feedLayout>
32...
33</Layout>