この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

describeFlexiPages()

一連の Lightning ページに関するメタデータ詳細を取得します。Lightning ページは、Salesforce1 ナビゲーションメニューのメニュー項目として表示されるモバイルアプリケーションのホームページです。

これらのアプリケーションページは、API では FlexiPage と呼ばれますが、それ以外の Salesforce ドキュメントおよび UI では Lightning ページと呼ばれます。

メモ

構文

1DescribeFlexiPageResult[] = connection.describeFlexiPages(string flexiPageNames[]);

使用方法

このコールを使用して、指定された Lightning ページに関する情報を取得します。このコールは、各 Lightning ページのレイアウトや関連付けられた QuickAction など、一連の Lightning ページに関するメタデータを返します。

flexiPageNames に対して空のリストを指定すると、Lightning ページは返されません。

このコールは高度な API コールであり、通常は、モバイルデバイスで出力を生成するためのカスタムページ表示コードを記述してから出力結果を表示する前に Lightning ページのレイアウト詳細を確認する必要のあるパートナーが使用します。

メモ

サンプルコード —Java

このサンプルでは、Lightning ページの取得方法を示します。記述する Lightning ページの名前を使用して、describeFlexiPage() をコールします。  Lightning ページを取得すると、範囲、コンポーネント、およびプロパティが出力されます。

1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17public void describeFlexiPageSample() {
18  try {
19        // Retrieve a single FlexiPage
20        String flexiPageName = "MyFlexiPage";
21        DescribeFlexiPageResult[] result = null;
22        result = connection.describeFlexiPages(new String[]{flexiPageName});
23        String msg = String.format("There are %s FlexiPages described in the response", result.length);
24        System.out.println(msg);
25        DescribeFlexiPageResult page = result[0];
26
27        // Iterate over the regions of the FlexiPage
28        for (DescribeFlexiPageRegion region : page.getRegions()) {
29            msg = String.format("Region: %s", region.getName());
30            
31            // Iterate over the components in each region
32            for (DescribeComponentInstance cmp : region.getComponents()) {
33                String fullComponentName = cmp.getTypeNamespace() + ":" + cmp.getTypeName();
34                System.out.println("Component: " + fullComponentName);
35                
36                // Iterate over the properties of each component
37                for (DescribeComponentInstanceProperty prop : cmp.getProperties()) {
38                    msg = String.format("Property [%s] has value [%s]", prop.getName(), prop.getValue());
39                    System.out.println(msg);
40                }
41            }
42        }
43    } catch (ConnectionException ce) {
44      ce.printStackTrace();
45    }
46}

引数

名前 説明
flexiPages string[] 取得する Lightning ページの配列。