Newer Version Available

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

FlexiPage

Represents a Lightning Page. A Lightning Page is a customizable screen containing Lightning components.

Includes access to the associated FlexiPage object in the Metadata API. Available from API version 31.0 or later.

Lightning Pages are used in several places.
  • In Salesforce1, a Lightning Page is the home page for an app that appears in the navigation menu.
  • In Lightning Experience, Lightning Pages can be used as the home page for an app, and to customize the layout of record pages and the Home page.

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

Supported SOAP Calls

create()query()retrieve()update()upsert()

Supported REST HTTP Methods

GET, HEAD

Fields

Field Details
Description
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The page description. This field can be useful to describe the reason for creating the page or its intended use.
DeveloperName
Type
string
Properties
Filter, Group, Sort
Description
The API name of the Lightning Page.
FullName
Type
string
Properties
Create, Group, Nillable
Description
The full name of the associated FlexiPage object in Metadata API.
Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.
ManageableState
Type
ManageableState enumerated list
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Indicates the manageable state of the specified component that is contained in a package:
  • beta
  • deleted
  • deprecated
  • installed
  • released
  • unmanaged

For more information about states of manageability for components in Force.com AppExchange packages, see “Planning the Release of Managed Packages” in the Salesforce online help.

This field is available in API version 38.0 and later.

MasterLabel
Type
string
Properties
Filter, Group, Sort
Description
The page’s label.
Metadata
Type
FlexiPageMetadata
Properties
Create, Nillable, Update
Description
Lightning Page metadata.
Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.
NamespacePrefix
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The namespace of the package of which the flexipage is a part.
ParentFlexiPage
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The name of the FlexiPage that this page inherits behavior from. Available in API version 37.0 or later.
SobjectType
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The object the FlexiPage is associated with. For Lightning Pages of type AppPage or HomePage, this field is null.

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

Available in API version 37.0 or later.

Type
Type
picklist
Properties
Filter, Group, Restricted picklistSort
Description
Required. The type of the Lightning Page. 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.
  • CommObjectPage—A Lightning Page used to override an object page in Lightning Experience, as created in the Community Builder, in Communities. This value is available in API version 38.0 and later.
  • CommQuickActionCreatePage—A Lightning Page used to override a create record page in Lightning Experience, as created in the 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 in Lightning Experience, 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 in Lightning Experience, 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 a search result page in Lightning Experience, as created in the Community Builder, in Communities. This value is available in API version 38.0 and later.
  • CommThemeLayoutPage—A Lightning Page used to override a theme layout page in Lightning Experience, as created in the Community Builder, in Communities. This value is available in API version 38.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 for Lightning for Outlook. 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.
  • UtilityBar—A Lightning Page used as the utility bar in Lightning Experience apps. This value is available in API version 38.0 and later.

Available in API version 32.0 or later. In API versions 32.0 through 36.0, this field can only have a value of AppPage.

Sample Code

This code sample creates a Lightning Page with a single Recent Items component, that shows recently used Accounts and MyCustomObject__cs

1ComponentInstance recentItems = new ComponentInstance();
2 recentItems.setComponentName("flexipage:recentItems");
3 ComponentInstanceProperty cip = new ComponentInstanceProperty();
4 cip.setName("entityNames");
5 cip.setValue("Account,MyCustomObject__c");
6 recentItems.setComponentInstanceProperties(new ComponentInstanceProperty[]{cip});
7
8FlexiPageRegion mainRegion = new FlexiPageRegion();
9mainRegion.setName("main");
10mainRegion.setType(FlexiPageRegionType.Region)
11mainRegion.setComponentInstances(new ComponentInstance[] { recentItems });
12
13FlexiPageMetadata fpMetadata = new FlexiPageMetadata();
14fpMetadata.setFlexiPageRegions(new FlexiPageRegion[]{mainRegion});
15fpMetadata.setMasterLabel("My FlexiPage");
16fpMetadata.setDescription("A FlexiPage with a recent items component");
17fpMetadata.setType(FlexiPageType.AppPage);
18
19FlexiPage flexiPage = new FlexiPage();
20flexiPage.setFullName("MyFlexiPageDevName");
21flexiPage.setMetadata(fp);
22
23// Create
24SaveResult saveResult = soapConnection.create(new SObject[] { flexiPage });