Newer Version Available

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

FlexiPage

Represents the metadata associated with a Lightning page. A Lightning page represents a customizable screen made up of regions containing Lightning components.

A Lightning page region can contain up to 25 components.

Note

This type extends the Metadata metadata type and inherits its fullName field.

These pages are known as FlexiPages in the API, but are referred to as Lightning pages in the rest of the Salesforce documentation and UI.

Note

Lightning pages are used in several places.
  • In the Salesforce app, a Lightning page is the home page for an app that appears in the navigation menu.
  • In Lightning Experience, Lightning pages can be used:
    • To customize the layout of record pages, the Salesforce Home page, and the Email Application pane in the Outlook and Gmail integrations.
    • As the home page for an app.
    • As the utility bar for a Lightning app.

For more information on Lightning pages, see Salesforce Help.

File Suffix and Directory Location

FlexiPage components have the suffix .flexipage and are stored in the flexipages folder.

Version

FlexiPage components are available in API version 29.0 and later.

Fields

Field Name Field Type Description
description string The optional description text of the Lightning page.
flexiPageRegions FlexiPageRegion[] The list of regions of a page.
masterLabel string Required. The label for the Lightning page, which displays in Setup.
pageTemplate string Deprecated. Use this field in API versions 33.0 to 38.0 only. In later versions, use template.

Required. The template associated with the Lightning page.

parentFlexiPage string The name of the Lightning page that this page inherits behavior from.

This field is available in API version 37.0 or later.

platformActionList PlatformActionList The list of all actions, and their order, that display on a Lightning app page. In the Salesforce mobile app, the actions appear in the action bar.

This field is available in API version 34.0 and later.

quickActionList QuickActionList The list of quick actions associated with the Lightning page.
sobjectType string The object the Lightning page is associated with. For Lightning pages of type AppPage or HomePage, this field is null.

After the value of this field is set, it can’t be changed.

This field is available in API version 37.0 or later.

template FlexiPageTemplateInstance Required. The template associated with the Lightning page.

This field is available in API version 39.0 and later.

type FlexiPageType (enumeration of type string) Required. The type of a page. In API versions 32.0 through 36.0, this field can only have a value of AppPage.
Valid values are:
  • AppPage—A Lightning page that is used as the home page for a custom app.
  • CommAppPage—A Lightning page that is used to represent a custom page, as created in the Community Builder, in Communities. This value is available in API version 37.0 and later.
  • CommFlowPage A Lightning page used to override a flow page, as created in the Community Builder, in Communities. This value is available in API version 45.0 and later.
  • CommForgotPasswordPage—A Lightning page that’s used to override a forgot-password page, as created in Community Builder, in Communities. This value is available in API version 39.0 and later.
  • CommFlowPage—An out-of-the-box flow page, as created in Community Builder, in Communities. This value is available in API version 45.0 and later.
  • CommGlobalSearchResultPage A Lightning page used to override the global search result page, as created in Community Builder, in Communities. This value is available in API version 41.0 and later.
  • CommLoginPage—A Lightning page that’s used to override the login page, as created in Community Builder, in Communities. This value is available in API version 39.0 and later.
  • CommObjectPage—A Lightning page used to override an object page, as created in Community Builder, in Communities. This value is available in API version 38.0 and later.
  • CommQuickActionCreatePage—A Lightning page used to override the create record page, as created in Community Builder, in Communities. This value is available in API version 38.0 and later.
  • CommRecordPage—A Lightning page used to override a record page, as created in the Community Builder, in Communities. This value is available in API version 38.0 and later.
  • CommRelatedListPage—A Lightning page used to override a related list page, as created in the Community Builder, in Communities. This value is available in API version 38.0 and later.
  • CommSearchResultPage—A Lightning page used to override the search result page, as created in Community Builder, in Communities. This value is available in API version 38.0 and later.
  • CommSelfRegisterPage—A Lightning page used to override the self-registration page, as created in Community Builder, in Communities. This value is available in API version 39.0 and later.
  • CommThemeLayoutPage—A Lightning page used to override a theme layout page, as created in the Community Builder, in Communities. This value is available in API version 38.0 and later.
  • EmbeddedServicePage This value is available in API version 45.0 and later.
  • HomePage—A Lightning page that is used to override the Home page in Lightning Experience. This value is available in API version 37.0 and later.
  • MailAppAppPage—An email application pane used to override the default layout in the Outlook and Gmail integrations. This value is available in API version 38.0 and later.
  • RecordPage—A Lightning page used to override an object record page in Lightning Experience. This value is available in API version 37.0 and later.
  • RecordPreview A Lightning page used to override standard lookup previews when hovering over previewable records in Lightning Experience.This value is available in API version 45.0 and later.
  • UtilityBar—A Lightning page used as the utility bar in Lightning Experience apps. This value is available in API version 38.0 and later.

This field is available in API version 32.0 and later.

FlexiPageRegion

FlexiPage Region represents the properties of a region of a page. A region can contain a record list component or a recent items component that can be scoped to a set of entities.

Field Name Field Type Description
appendable RegionFlagStatus (enumeration of type string) This field is available in Communities in API 45.0 or later, but is reserved for future use for all other areas.
Valid values are:
  • disabled
  • enabled
This field is assessed in combination with replaceable and prependable
  • If all the properties are set to enabled, the region is unlocked
  • If all the properties are set to disabled, the region is locked
  • If none of the properties are specified OR any of these three properties are missing, the region is unlocked.

This field is available in API version 35.0 or later.

componentInstances ComponentInstance[] Properties and name of the component instance.
mode FlexiPageRegionMode (enumeration of type string) This field is reserved for future use.
Valid values are:
  • Append
  • Prepend
  • Replace

This field is available in API version 35.0 or later.

name string Required. Unique name of the FlexiPage region.
prependable RegionFlagStatus (enumeration of type string) This field is available in Communities in API 45.0 or later, but is reserved for future use for all other areas.
Valid values are:
  • disabled
  • enabled
This field is assessed in combination with appendable and replaceable.
  • If all the properties are set to enabled, the region is unlocked
  • If all the properties are set to disabled, the region is locked
  • If none of the properties are specified OR any of these three properties are missing, the region is unlocked.

This field is available in API version 35.0 or later.

replaceable RegionFlagStatus (enumeration of type string) This field is available in Communities in API 45.0 or later, but is reserved for future use for all other areas.
Valid values are:
  • disabled
  • enabled
This field is assessed in combination with appendable and prependable.
  • If all the properties are set to enabled, the region is unlocked
  • If all the properties are set to disabled, the region is locked
  • If none of the properties are specified OR any of these three properties are missing, the region is unlocked.

This field is available in API version 35.0 or later.

type FlexiPageRegionType (enumeration of type string) Required. The type of FlexiPage region.
Valid values are:
  • Background—Represents a region for background utility items, which aren’t visible in the UI. Supported for utility bars only.
  • Facet
  • Region

This field is available in API version 35.0 or later.

ComponentInstance

Instance of a component in a page, such as a filter list.

Field Name Field Type Description
componentInstanceProperties ComponentInstanceProperty[] The value of a single property in a component instance.
componentName string Required. The name of a single instance of a component.
visibilityRule UiFormulaRule A set of one or more filters that define the conditions under which the component displays on the page.

If the rule evaluates to true, the component displays on the page. If false, it doesn't display. If this field is null, the component displays by default.

This field is available in API version 41.0 and later.

ComponentInstanceProperty

Value of a single property in a component instance.

Field Name Field Type Description
name string Name of the property, unique within the component instance. For Lightning components, this value is the <aura:attribute> as defined in the .cmp file.
type ComponentInstancePropertyTypeEnum (enumeration of type string) If this field value is null, then the ComponentInstanceProperty values apply to the Lightning component. If this field value is decorator, then the ComponentInstanceProperty values apply to the component decorator for the Lightning component.

The component decorator is a wrapper around a Lightning component. The decorator can apply more capabilities to the component when it renders on a specific page in Lightning Experience. For example, you can configure a component decorator around a component on the Lightning Experience utility bar to set the component’s height or width when opened. The UtilityBar is the only page type that supports component decorators.

Valid values are:
  • decorator

This field is available in API version 38.0 or later.

value string Reference or value of the property.

When defining a Related List component, to use a parent record set the parentFieldApiName value to object.field_name. If you don’t want to use a parent record, set the value to object.Id.

When you give a standard label to a tab in a Tabs component—such as Activity, Collaborate, or Details—and when the name field is set to title, the value field uses a system-defined value instead of the label. Here are some examples of the system-defined values:
  • Standard.Tab.activity
  • Standard.Tab.collaborate
  • Standard.Tab.detail
  • Standard.Tab.feed
  • Standard.Tab.preview
  • Standard.Tab.relatedLists
For example, let’s say you have a Lightning page that contains a tab with the standard label “Activity”. If you query the definition that page, you see the system-defined name of the tab, not the label, in value.
1<componentInstances>
2  <componentInstanceProperties>
3    <name>title</name>
4    <value>Standard.Tab.activity</value>
5  </componentInstanceProperties>
6    <componentName>flexipage:tab</componentName>
7</componentInstances>

UiFormulaRule

A set of one or more filters that define the conditions under which a component displays on a Lightning page. For example, you could construct a filter that causes a rich text component on an opportunity page to display only when the Amount is greater than $1,000,000. Available in API version 41.0 and later.

Field Name Field Type Description
booleanFilter string Specifies advanced filter conditions such as 1 AND 2.
criteria UiFormulaCriterion[] List of one or more filters that, when evaluated, determine component visibility.

FlexiPageTemplateInstance

FlexiPageTemplateInstance represents an instance of a Lightning page template.

Field Name Field Type Description
name string Required. The name of a single instance of a template.
properties ComponentInstanceProperty[] The value of a single property in a template instance.

Valid only for CommThemeLayoutPage. Contains a name and value pair for each theme layout property associated with the page template. In Community Builder, the theme layout and its properties appear in the Theme area.

PlatformActionList

PlatformActionList represents the list of actions, and their order, that display on a Lightning app page. Available in API version 34.0 and later.

Field Name Field Type Description
actionListContext PlatformActionListContext (enumeration of type string) Required. The context of the action list. Valid values are:
  • ActionDefinition—Reserved for future use.
  • Assistant
  • BannerPhoto
  • Chatter
  • Dockable
  • FeedElement
  • Flexipage
  • Global
  • ListView
  • ListViewDefinition
  • ListViewRecord
  • Lookup
  • MruList
  • MruRow
  • ObjectHomeChart
  • Photo
  • Record
  • RecordEdit
  • RelatedList
  • RelatedListRecord
platformActionListItems PlatformActionListItem[] The actions in the PlatformActionList.
relatedSourceEntity string When the ActionListContext is RelatedList or RelatedListRecord, this field represents the API name of the related list to which the action belongs.

PlatformActionListItem

PlatformActionListItem represents an action in the PlatformActionList. Available in API version 34.0 and later.

Field Name Field Type Description
actionName string Required. The API name for the action in the list.
actionType PlatformActionType (enumeration of type string) Required. The type of action. Valid values are:
  • ActionLink—An indicator on a feed element that targets an API, a web page, or a file, represented by a button in the Salesforce Chatter feed UI.
  • CustomButton—When clicked, opens a URL or a Visualforce page in a window or executes JavaScript.
  • InvocableAction
  • ProductivityAction—Productivity actions are predefined and attached to a limited set of objects. Productivity actions include Send Email, Call, Map, View Website, and Read News. Except for the Call action, you can’t edit or delete productivity actions.
  • QuickAction—A global or object-specific action.
  • StandardButton—A predefined Salesforce button such as New, Edit, and Delete.
sortOrder int Required. The placement of the action in the list.
subtype string The subtype of the action. For quick actions, the subtype is QuickActionType. For custom buttons, the subtype is WebLinkTypeEnum. For action links, subtypes are Api, ApiAsync, Download, and Ui. Standard buttons and productivity actions have no subtype.

UiFormulaCriterion

A single filter that when evaluated, helps define component visibility on a Lightning page. Available in API version 41.0 and later.

Field Name Field Type Description
leftValue string Required. The field upon which the filter is based. For example, AMOUNT.
operator string Required. Defines the operator used to filter the data. Valid values are:
  • CONTAINS
  • EQUAL
  • NE—not equal
  • GT—greater than
  • GE—greater than or equal
  • LE—less than or equal
  • LT—less than
rightValue string The value by which you want to evaluate the component’s visibility. For example, 1000000.
You can use these expressions in the leftValue field when setting filters for component visibility.
  • {!$Client.FormFactor}—Use this expression to control component visibility based on the device the page is being rendered on. Valid values are Small (phone), Medium (tablet), and Large (Lightning Experience desktop). Setting the value to Small for record pages is supported only in orgs that are enabled for the new Salesforce mobile app. This expression is supported for app pages in API version 41.0 and later, and record pages in API version 47.0 and later.
  • {!$Permission.CustomPermission.permissionName}—Use this expression to control component visibility based on the custom permissions of the user viewing the Lightning page. Supported for app, Home, and record pages only.
  • {!$Permission.StandardPermission.permissionName}—Use this expression to control component visibility based on the standard permissions of the user viewing the Lightning page. Supported for app, Home, and record pages only.
  • {!Record.field}—Supported for record pages only.
  • {!$User.field}—Supported for app, Home, and record pages only.

For example, to display a component only when it renders on a phone, add this filter: {!$Client.FormFactor} EQUAL "SMALL". Or, to display a component only to the System Administrator, use {!$User.Profile.Name} EQUAL "System Administrator".

Expressions in component visibility rules can span no more than five fields. For example, {!Record.Account.Owner.Manager.Manager.Manager.LastName} has six spans and therefore isn’t supported.

Declarative Metadata Sample Definition

Here’s a sample XML FlexiPage component definition for a custom opportunity record page. It includes a tab set and a rich text component with visibility rules assigned to it.

As a community page, three initial regions in the definition show the header region as locked, the content region as unlocked, and the footer region as unlocked.

Note

1<?xml version="1.0" encoding="UTF-8"?>
2<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
3        <componentInstances>
4            <componentInstanceProperties>
5                <name>collapsed</name>
6                <value>false</value>
7            </componentInstanceProperties>
8            <componentInstanceProperties>
9                <name>numVisibleActions</name>
10                <value>3</value>
11            </componentInstanceProperties>
12            <componentName>force:highlightsPanel</componentName>
13        </componentInstances>
14    <flexiPageRegions>
15        <appendable>disabled</appendable>
16        <name>header</name>
17        <prependable>disabled</prependable>
18        <replaceable>disabled</replaceable>
19        <type>Region</type>
20    </flexiPageRegions>
21    <flexiPageRegions>
22        <appendable>enabled</appendable>
23        <componentInstances>
24            <componentName>forceCommunity:fileDetailPage</componentName>
25        </componentInstances>
26        <name>content</name>
27        <prependable>enabled</prependable>
28        <replaceable>enabled</replaceable>
29        <type>Region</type>
30    </flexiPageRegions>
31    <flexiPageRegions>
32                <name>footer</name>        
33        <type>Region</type>
34    </flexiPageRegions>
35
36    <flexiPageRegions>
37        <componentInstances>
38            <componentName>force:detailPanel</componentName>
39        </componentInstances>
40        <name>facet-82dce3a7-1222-4948-8b41-533cdd60aaa4</name>
41        <type>Facet</type>
42    </flexiPageRegions>
43    <flexiPageRegions>
44        <componentInstances>
45            <componentName>runtime_sales_activities:activityPanel</componentName>
46        </componentInstances>
47        <name>facet-4bdf038a-4568-4c4e-b220-b5ec47f656e9</name>
48        <type>Facet</type>
49    </flexiPageRegions>
50    <flexiPageRegions>
51        <componentInstances>
52            <componentName>wits:newsPanel</componentName>
53        </componentInstances>
54        <name>facet-8d5ecfff-4590-49c0-a09e-3df84179f642</name>
55        <type>Facet</type>
56    </flexiPageRegions>
57    <flexiPageRegions>
58        <componentInstances>
59            <componentName>force:relatedListContainer</componentName>
60        </componentInstances>
61        <name>facet-551d8770-5093-4222-927e-9138061ebbbf</name>
62        <type>Facet</type>
63    </flexiPageRegions>
64    <flexiPageRegions>
65        <componentInstances>
66            <componentInstanceProperties>
67                <name>body</name>
68                <value>facet-82dce3a7-1222-4948-8b41-533cdd60aaa4</value>
69            </componentInstanceProperties>
70            <componentInstanceProperties>
71                <name>title</name>
72                <value>Standard.Tab.detail</value>
73            </componentInstanceProperties>
74            <componentName>flexipage:tab</componentName>
75        </componentInstances>
76        <componentInstances>
77            <componentInstanceProperties>
78                <name>body</name>
79                <value>facet-4bdf038a-4568-4c4e-b220-b5ec47f656e9</value>
80            </componentInstanceProperties>
81            <componentInstanceProperties>
82                <name>title</name>
83                <value>Standard.Tab.activity</value>
84            </componentInstanceProperties>
85            <componentName>flexipage:tab</componentName>
86        </componentInstances>
87        <componentInstances>
88            <componentInstanceProperties>
89                <name>body</name>
90                <value>facet-8d5ecfff-4590-49c0-a09e-3df84179f642</value>
91            </componentInstanceProperties>
92            <componentInstanceProperties>
93                <name>title</name>
94                <value>Recent Items</value>
95            </componentInstanceProperties>
96            <componentName>flexipage:tab</componentName>
97        </componentInstances>
98        <componentInstances>
99            <componentInstanceProperties>
100                <name>active</name>
101                <value>true</value>
102            </componentInstanceProperties>
103            <componentInstanceProperties>
104                <name>body</name>
105                <value>facet-551d8770-5093-4222-927e-9138061ebbbf</value>
106            </componentInstanceProperties>
107            <componentInstanceProperties>
108                <name>title</name>
109                <value>Standard.Tab.relatedLists</value>
110            </componentInstanceProperties>
111            <componentName>flexipage:tab</componentName>
112        </componentInstances>
113        <name>facet-f433d4c6-94e6-4de4-90fc-83501abf3536</name>
114        <type>Facet</type>
115    </flexiPageRegions>
116    <flexiPageRegions>
117        <componentInstances>
118            <componentInstanceProperties>
119                <name>tabs</name>
120                <value>facet-f433d4c6-94e6-4de4-90fc-83501abf3536</value>
121            </componentInstanceProperties>
122            <componentName>flexipage:tabset</componentName>
123        </componentInstances>
124        <name>main</name>
125        <type>Region</type>
126    </flexiPageRegions>
127    <flexiPageRegions>
128        <componentInstances>
129            <componentInstanceProperties>
130                <name>hideUpdateButton</name>
131                <value>false</value>
132            </componentInstanceProperties>
133            <componentName>runtime_sales_pathassistant:pathAssistant</componentName>
134        </componentInstances>
135        <name>subheader</name>
136        <type>Region</type>
137    </flexiPageRegions>
138    <flexiPageRegions>
139        <componentInstances>
140            <componentInstanceProperties>
141                <name>decorate</name>
142                <value>true</value>
143            </componentInstanceProperties>
144            <componentInstanceProperties>
145                <name>richTextValue</name>
146                <value>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;
147                span style=&quot;font-family:georgia,serif;&quot;&gt;&lt;
148                span style=&quot;font-size: 18px;&quot;&gt;&lt;b&gt;
149                A million dollar opportunity closed! Oh yeah!&lt;/b&gt;&lt;
150                /span&gt;&lt;/span&gt;&lt;/div&gt;</value>
151            </componentInstanceProperties>
152            <componentName>flexipage:richText</componentName>
153            <visibilityRule>
154                <booleanFilter>1 AND 2</booleanFilter>
155                <criteria>
156                    <leftValue>{!Record.Amount}</leftValue>
157                    <operator>GE</operator>
158                    <rightValue>1000000</rightValue>
159                </criteria>
160                <criteria>
161                    <leftValue>{!Record.StageName}</leftValue>
162                    <operator>EQUAL</operator>
163                    <rightValue>Closed Won</rightValue>
164                </criteria>
165            </visibilityRule>
166        </componentInstances>
167        <componentInstances>
168            <componentName>forceChatter:recordFeedContainer</componentName>
169        </componentInstances>
170        <name>sidebar</name>
171        <type>Region</type>
172    </flexiPageRegions>
173    <masterLabel>New Opportunity Page</masterLabel>
174    <sobjectType>Opportunity</sobjectType>
175    <template>
176        <name>flexipage:recordHomeWithSubheaderTemplateDesktop</name>
177    </template>
178    <type>RecordPage</type>
179</FlexiPage>

And, here’s the sample package.xml file that references the FlexiPage component definition:

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <fullName>New Opportunity Page Package</fullName>
4    <description>Contains an opportunity page with a rich text component that has rules assigned</description>
5    <types>
6        <members>New_Opportunity_Page</members>
7        <name>FlexiPage</name>
8    </types>
9    <version>41.0</version>
10</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.