Newer Version Available

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

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.

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

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.

This call is an advanced API call that is typically used by partners who have written custom page rendering code for generating output on a mobile device and need to examine the layout details of a Lightning Page before rendering the output.

Note

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}

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.

Name Type Description
type FlexipageContextTypeEnum enumeration of type string The FlexipageContext type. Valid values are:
  • ENTITYNAME
value string Value of the FlexipageContext.