Newer Version Available
FlexiPage
Includes access to the associated FlexiPage object in the Metadata API. Available from API version 31.0 or later.
- 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.
Supported SOAP Calls
create(), query(), retrieve(), update(), upsert()
Supported REST HTTP Methods
GET, HEAD
Fields
| Field | Details |
|---|---|
| Description |
|
| DeveloperName |
|
| FullName |
|
| ManageableState |
This field is available in API version 38.0 and later. |
| MasterLabel |
|
| Metadata |
|
| NamespacePrefix |
|
| ParentFlexiPage |
|
| SobjectType |
Available in API version 37.0 or later. |
| Type |
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 });