Newer Version Available

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

FlexiPage

Represents a Lightning Page. A Lightning Page is the home page for an app that appears as a menu item in the Salesforce1 navigation menu. Includes access to the associated FlexiPage object in the Salesforce Metadata API. Available from API version 31.0 or later.

These app 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 email page description. This 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.
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.
SobjectType
Type
string
Properties
Filter, Group, Nillable, Sort
Description
This field is reserved for future use.

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

Available in API version 33.0 or later.

Type
Type
picklist
Properties
Filter, Group, Restricted picklistSort
Description
Required. The type of the Lightning Page

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

Sample Code

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

1swfobject.registerObject("clippy.codeblock-0", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 ComponentInstance recentItems = new ComponentInstance();
18 recentItems.setComponentName("flexipage:recentItems");
19 ComponentInstanceProperty cip = new ComponentInstanceProperty();
20 cip.setName("entityNames");
21 cip.setValue("Account,MyCustomObject__c");
22 recentItems.setComponentInstanceProperties(new ComponentInstanceProperty[]{cip});
23
24FlexiPageRegion mainRegion = createRegion("main");
25mainRegion.setComponentInstances(new ComponentInstance[] { recentItems });
26
27FlexiPageMetadata fpMetadata = new FlexiPageMetadata();
28fpMetadata.setFlexiPageRegions(new FlexiPageRegion[]{mainRegion});
29fpMetadata.setMasterLabel("My FlexiPage");
30fpMetadata.setDescription("A FlexiPage with a recent items component");
31
32FlexiPage flexiPage = new FlexiPage();
33flexiPage.setFullName("MyFlexiPageDevName");
34flexiPage.setMetadata(fp);
35
36// Create
37SaveResult saveResult = soapConnection.create(new SObject[] { flexiPage });