Newer Version Available
describeFlexiPages()
Retrieves metadata details about a set of Lightning Pages. A Lightning Page is the home page for a mobile app that appears as a menu item in the Salesforce1 navigation menu.
Syntax
1DescribeFlexiPageResult[] = connection.describeFlexiPages(string flexiPageNames[]);Usage
Use this call to retrieve information about the specified Lightning Pages. This call returns metadata about a set of Lightning Pages, such as each Lightning Page’s layout and associated QuickActions.
If you supply an empty list for flexiPageNames, no Lightning Pages are returned.
Sample Code—Java
This sample shows how to get a Lightning Page. It calls describeFlexiPage() with the name of a Lightning Page to describe. After getting the Lightning Page, it prints out the regions, components and properties.
1public void describeFlexiPageSample() {
2 try {
3 // Retrieve a single FlexiPage
4 String flexiPageName = "MyFlexiPage";
5 DescribeFlexiPageResult[] result = null;
6 result = connection.describeFlexiPages(new String[]{flexiPageName});
7 String msg = String.format("There are %s FlexiPages described in the response", result.length);
8 System.out.println(msg);
9 DescribeFlexiPageResult page = result[0];
10
11 // Iterate over the regions of the FlexiPage
12 for (DescribeFlexiPageRegion region : page.getRegions()) {
13 msg = String.format("Region: %s", region.getName());
14
15 // Iterate over the components in each region
16 for (DescribeComponentInstance cmp : region.getComponents()) {
17 String fullComponentName = cmp.getTypeNamespace() + ":" + cmp.getTypeName();
18 System.out.println("Component: " + fullComponentName);
19
20 // Iterate over the properties of each component
21 for (DescribeComponentInstanceProperty prop : cmp.getProperties()) {
22 msg = String.format("Property [%s] has value [%s]", prop.getName(), prop.getValue());
23 System.out.println(msg);
24 }
25 }
26 }
27 } catch (ConnectionException ce) {
28 ce.printStackTrace();
29 }
30}Faults
Arguments
| Name | Type | Description |
|---|---|---|
| flexiPages | string[] | An array of Lightning Pages to be retrieved. |
| contexts | FlexipageContext[] | An array of contexts for the FlexiPages, such as Account or
Contact. This argument isn’t necessary for pages of type
AppPage. Available in API version 35.0 or later. |
FlexipageContext
Represents the context of the FlexiPage, such as Account or Contact. Not applicable for pages of type AppPage. Available in API version 35.0 or later.