Layout defines a Salesforce page layout: its fields and sections, buttons and actions, related lists, and embedded content. It also contains specialized settings for feed views, console sidebars, mini layouts, mobile cards, and Salesforce Classic highlights panels. These nested structures are parts of the Layout asset, not independently deployable layouts.
A layout references fields, actions, pages, and other assets; it does not create them or grant users access to them. Layout composition, field-level security (field visibility and edit permissions), and profile and record-type layout assignments are separate configurations. A global publisher layout is also different from the form shown by an individual global action.
Key Elements
| Element | What the Element Controls |
|---|---|
layoutSections |
The main page sections, in display order. Each section contains layoutColumns and layoutItems. Section style supports OneColumn, TwoColumnsTopToBottom, TwoColumnsLeftToRight, and CustomLinks. |
behavior |
A field item's layout-level editing behavior: Edit, Required, or Readonly. This is not a field definition or permission grant. |
customButtons |
Custom buttons on the layout, referencing WebLink definitions on the same object. |
excludeButtons |
Standard buttons omitted from the layout. Hiding a button does not define user permissions. |
quickActionList |
The quick actions displayed in the full Salesforce site, identified by quickActionName. |
platformActionList |
Actions and their order in the Salesforce mobile app action bar. Requires actionListContext; each action must be interpreted using both actionName and actionType. |
relatedLists |
Related lists in UI display order, including their fields, buttons, quick actions, and sorting. sortOrder applies only when sortField is set. |
miniLayout |
The console mini view, hover details, and event overlays. Its fields must also appear in the main layout; mini related lists cannot have sorting configured. |
relatedObjects |
Foreign-key fields on the layout's object used by the console mini view, not an arbitrary list of object names. |
summaryLayout |
The Salesforce Classic highlights-panel grid when Case Feed is enabled. Supports one through four columns and one or two rows, with at least one summaryLayoutItems entry. |
analyticsCloudComponent |
An embedded CRM Analytics dashboard. Requires assetType set to dashboard and the dashboard development name in devName. |
reportChartComponent |
An embedded report chart, including its reportName, record-context filtering, caching, and error visibility. |
feedLayout |
The feed view of a feed-based layout, including feed filters, publisher behavior, sidebars, and left and right components. |
customConsoleComponents |
Console-only sidebar components grouped in containers on primary tabs and subtabs. Supports Visualforce pages, lookup fields, and related lists, but not Canvas apps. |
runAssignmentRulesDefault |
The default state of the assignment-rules checkbox. Meaningful only with showRunAssignmentRulesCheckbox; it does not define assignment rules. |
Behavior and Constraints
Field composition and editing
Section order determines the layout order. Columns are ordered left to right, and items within each column are ordered top to bottom. The difference between TwoColumnsTopToBottom and TwoColumnsLeftToRight includes keyboard tab navigation order, not execution order.
For a field item, Edit permits editing without making the field required on the layout. Required permits editing and requires a value on the layout. Readonly displays the field as read-only. Explicitly specifying UiBehavior through behavior for Knowledge articles results in an exception.
Within a LayoutItem, the content selectors component, customLink, field, scontrol, page, analyticsCloudComponent, and reportChartComponent are mutually exclusive. A field reference is relative to the layout's object, such as Description or MyField__c. A customLink belongs in a section whose style is CustomLinks.
The component value sfa:socialCard is allowed only within a RelatedContentItem on Account, Contact, or Lead layouts. It is not a general-purpose way to insert components.
Section customLabel distinguishes custom section labels, which require translation, from built-in labels that Salesforce translates automatically. Deploying a layout does not create its translations.
Actions, buttons, and object-specific controls
For platform actions, actionType can be ActionLink, CustomButton, InvocableAction, ProductivityAction, QuickAction, or StandardButton. Depending on that type, actionName can identify a quick action or custom button rather than a standard action. sortOrder specifies placement in the list.
platformActionList.actionListContext is required. When its value is RelatedList or RelatedListRecord, relatedSourceEntity identifies the related list's API name. An action name alone therefore does not establish where the action belongs.
-
showRunAssignmentRulesCheckboxis allowed on Case, Lead, and Account layouts.runAssignmentRulesDefaultcontrols its default state, not the assignment rule definitions. -
showEmailCheckboxis allowed on Case, CaseClose, and Task layouts.emailDefaultis meaningful only with this checkbox setting. -
showKnowledgeComponentdisplays the Knowledge sidebar only on Case layouts in the Salesforce console. -
showSolutionSectionis restricted to CaseClose layouts. -
showSubmitAndAttachButtonis restricted to Case layouts and displays Submit & Add Attachment on Customer Portal case edit pages.
Related lists and secondary views
Each related-list entry requires relatedList. When sortField is set, sortOrder accepts Asc or Desc. Standard related-list fields can retrieve under aliases: Fax, Mobile, and Home Phone appear as Phone2, Phone3, and Phone4. These aliases should not automatically be diagnosed as missing CustomField definitions.
Fields in miniLayout.fields must appear in the main layout. Fields used by its related lists must likewise appear in the main layout. Although mini related lists reuse RelatedListItem, which exposes sortField and sortOrder, sorting cannot be configured for them. multilineLayoutFields applies specifically to the special multiline layout on OpportunityProduct.
summaryLayout requires masterLabel, sizeX, sizeY, and at least one summaryLayoutItems entry. Its fields must also exist on the detail page, and item positions must fit the configured grid. This configures the Salesforce Classic highlights panel when Case Feed is enabled; it is distinct from showHighlightsPanel, which displays a panel in the console.
Embedded dashboards and report charts
For analyticsCloudComponent, devName is the dashboard's development name, not a record ID. filter supplies initial mappings between dashboard data fields and object fields to make the dashboard relevant to the current record.
Dashboard hideOnError defaults to true, hiding the dashboard when an error occurs. With false, the dashboard appears with the error instead of data. Lack of access to CRM Analytics or to the dashboard can cause an error, so an absent dashboard can indicate an access or rendering problem rather than a missing layout item.
A reportChartComponent references a report through reportName. includeContext enables record-context filtering, and contextFilterableField identifies the development name of the filtering field. The report type's parent object and the page's parent object must match to return relevant chart data.
Report chart errors can result from inaccessible fields or removal of the chart from its report. Setting hideOnError to true hides the chart on error. Setting cacheData to true caches chart data for 24 hours; setting it to false does not mean the report runs on every page refresh.
Feed-based layouts
A feed-based layout has both a feed view and a detail view. Feed-based layouts are available on Account, Case, Contact, Lead, Opportunity, custom objects, and external objects.
Feed filters and components have object restrictions. ActivityEvent, AttachArticleEvent, CaseCommentPost, ChangeStatusPost, ChatTranscriptPost, EmailMessageEvent, MilestoneEvent, and ReplyPost are Case-only feed item types. CallLogPost requires an object that supports Activities. The HelpAndToolLinks and Milestones feed components are also Case-only.
A custom filter's feedFilterName uses an object-qualified name, such as Case.MyCustomFeedFilter. Feed-filter spellings have documentation discrepancies described below.
Console containers and lookup components
primaryTabComponents and subtabComponents use containers to group sidebar components. Up to five components can be specified at each location: left, right, top, and bottom.
Top and bottom placements require height; left and right placements require width. The unit setting determines whether dimensions use pixels or percent. Pixel dimensions must be greater than 0 and less than 999. Percentage dimensions must include the percent sign and be greater than 0 and less than 100. The required isContainerAutoSizeEnabled setting controls vertical autosizing for stacked components and defaults to true for newly created console components.
For a lookup sidebar component, enableLinking controls whether users can associate a record with the lookup field. When it is false, createAction and updateAction cannot be retrieved. Their absence from retrieved metadata therefore does not prove that the source layout never configured them.
A console related-list component can set hideOnDetail to suppress the same list on the detail page and avoid duplicate presentation.
Deployment and Retrieval
Metadata API layout files reside in the package's layouts directory and use the .layout extension. Layout supports the * wildcard in package.xml. The Ideas layout must be identified explicitly as Idea-Idea Layout for retrieval.
Retrieving a layout makes it appear in any Profile and PermissionSet components retrieved in the same package. This retrieval side effect is not evidence that permission sets assign page layouts.
Page layouts can be included in change sets. Their referenced field definitions, field-level security, and profile and record-type layout assignments remain separate concerns. A successful layout deployment does not establish that the intended user sees the intended fields or layout.
Community reports identify Global-Global Layout as the global publisher layout. The form fields and settings of an individual global action are retrieved through QuickAction, using an unqualified global action name such as NewTask, not Account.NewTask. Global publisher layout assignments have been reported in Profile.layoutAssignments.
Object-associated layout names follow <objectName>-<layoutName>. The text before the first dash identifies the object context; the remainder is the layout name. Preserve namespaces and the complete component name. The associated object context can be standard or custom. This naming association is not an XML reference and does not, by itself, require deploying the object with the layout.
Relationships
Dependencies occur throughout the nested layout structures, not only in the main field sections. Field and related-list references can associate with CustomField or CustomObject, depending on context. For dashboard dependency resolution, Dashboard and WaveDashboard are alternative associations for devName, not a requirement to deploy both. The object-prefix naming association described above is separate from these element references.
References
-
ApexPage:pagein main layout items, mobile cards, feed components, and console sidebars. -
ConnectedApp:canvas. -
CustomFeedFilter:feedFilterName. -
CustomField:contextFilterableField,field,fields,lookup,multilineLayoutFields,relatedList,relatedObjects,sortField. -
CustomObject:field,fields,lookup,relatedList,relatedSourceEntity. -
Dashboard:devName. -
QuickAction:actionName,createAction,quickActionName,quickActions,updateAction. -
Report:reportName. -
Scontrol:scontrol. -
WaveDashboard:devName. -
WebLink:actionName,customButtons,customLink.
Referenced By
-
CustomObjectTranslation:layout. -
Profile:layoutwithinlayoutAssignments.
Documentation Inconsistencies
Feed-filter metadata has consequential differences between the exposed structure and Salesforce's field reference:
-
feedFilterPositionexposesCenterDropDown,LeftFixed, andLeftFloat, while the field reference listscenterDropDown,leftFixed, andleftFloat. -
feedFilterTypeexposesAllUpdates,Custom, andFeedItemType, while the field reference lists onlyAllUpdatesandFeedItemType. -
feedItemTypeexposesCreateRecordEvent, while the field reference usesCreatedRecordEvent. - The descriptive prose mentions
standardFilter, but that element is absent from the exposed filter structure.
These spellings should not be silently treated as equivalent when diagnosing validation failures or comparing filter metadata.
Reported Issues
- A successful change-set deployment can leave layout changes apparently missing. A 2014 discussion identified separate checks for new field definitions, profile field-level security, and profile and record-type layout assignments. The questioner reported resolving the visibility problem by including profiles. Change-set visibility discussion.
-
Retrieving the global publisher layout does not retrieve an individual action's form settings. In 2019, contributors distinguished
Layout:Global-Global Layoutfrom individualQuickActioncomponents, whose global names are unqualified. One report retrieved the action's columns and items throughQuickAction. Publisher layout and action naming; Individual action form retrieval. -
Moving the global publisher layout alone can omit its assignment. A 2023 report placed the assignment in
Profile.layoutAssignments, referencingGlobal-Global Layout. Global publisher assignment discussion. -
Layout-assignment changes may be missing from source-tracking results. Contributors in 2019 and 2021 reported that assignment changes were not detected by source status or pull. They used explicit profile retrieval; one reported retrieving
Profile,Layout,RecordType, and the relevantCustomObjecttogether. These are reported retrieval approaches, not a universal deployment requirement. Assignment tracking report; Combined retrieval report. - An empty dependent picklist can be a layout-composition problem. In a 2012 standard page-layout discussion, omitting the controlling field left the dependent picklist without available values even though workflow populated the controlling field. This makes both fields' placement relevant to diagnosis, not just the dependency definition. Dependent picklist discussion.
- A Screen Flow lookup error can involve another object's layout assignment. In a 2023 report involving an OpportunityContactRole lookup, assigning the user's profile a page layout for the object referenced by the lookup resolved a similar layout-retrieval error. This is a diagnostic possibility, not a universal cause. Flow lookup assignment report.
- An external interface may allow editing despite layout-level read-only behavior. A 2013 report described a .NET portal using a broadly privileged integration user that allowed edits to fields marked read-only on the Salesforce layout. Layout metadata describes intended UI behavior without proving that an external client enforces it. External portal read-only discussion.
- A guest profile may be missing from the Lightning layout-assignment screen. In 2021, a contributor reported reproducing this behavior and editing the site's guest profile assignment through Salesforce Classic instead. Guest profile assignment report.
Common Questions
Why did my page layout deploy successfully but the new fields are missing?
The layout does not create fields or grant access. Check whether the field definitions moved, whether field-level security permits visibility, and whether the user's profile and record type select the intended layout.
How do I retrieve a global action layout?
For the global publisher layout, community reports use Layout member Global-Global Layout. For an individual global action's form and settings, retrieve QuickAction using its unqualified name, such as NewTask.
Does retrieving a layout with a permission set mean permission sets assign layouts?
No. Layout retrieval affects the content of Profile and PermissionSet components retrieved in the same package. That side effect does not establish permission-set layout assignment.
Why does an embedded dashboard or report chart disappear?
Check its hideOnError setting. Dashboard errors can result from missing CRM Analytics or dashboard access. Report chart errors can result from inaccessible fields or a chart removed from its report.
Can a mini layout use fields that are not on the main layout?
No. Mini-layout fields and fields used by its related lists must also appear in the main layout. Mini related lists also cannot have sorting configured.