FlexiPage
- Salesforce アプリケーションでは、Lightning ページはナビゲーションメニューに表示されるアプリケーションのホームページです。
- Lightning Experience では、Lightning ページを次の目的で使用できます。
- レコードページ、Salesforce ホームページ、Outlook および Gmail インテグレーションのメールアプリケーションペインのレイアウトをカスタマイズする。
- アプリケーションのホームページとして。
- Lightning アプリケーションのユーティリティバーとして。
Lightning ページについての詳細は、Salesforce ヘルプを参照してください。
ファイルのサフィックスおよびディレクトリの場所
FlexiPage コンポーネントのサフィックスは .flexipage で、flexipages フォルダに保存されます。
バージョン
FlexiPage コンポーネントは、API バージョン 29.0 以降で使用できます。
項目
| 項目名 | 項目の型 | 説明 |
|---|---|---|
| description | string | Lightning ページの説明テキスト (省略可能)。 |
| flexiPageRegions | FlexiPageRegion[] | ページの領域のリスト。 |
| masterLabel | string | 必須。[設定] に表示される Lightning ページの表示ラベル。 |
| pageTemplate | string | 非推奨。この項目は API バージョン 33.0 から 38.0 でのみ使用してください。それ以降のバージョンでは、template を使用してください。 |
| parentFlexiPage | string | このページが動作を継承する元となる Lightning ページの名前。 この項目は、API バージョン 37.0 以降で使用できます。 |
| platformActionList | PlatformActionList | Lightning アプリケーションページに表示されるすべてのアクションとその順序のリスト。Salesforce モバイルアプリケーションの場合、アクションはアクションバーに表示されます。 この項目は、API バージョン 34.0 以降で使用できます。 |
| quickActionList | QuickActionList | Lightning ページに関連付けられたクイックアクションのリスト。 |
| sobjectType | string |
Lightning ページが関連付けられているオブジェクト。種別が AppPage または HomePage の Lightning ページ では、この項目は null です。 この項目の値を設定すると、変更はできません。 この項目は、API バージョン 37.0 以降で使用できます。 |
| template | FlexiPageTemplateInstance |
必須。Lightning ページに関連付けられているテンプレート。 この項目は、API バージョン 39.0 以降で使用できます。 |
| type | FlexiPageType (string 型の列挙) |
必須。ページの種別。API バージョン 32.0 ~ 36.0 では、この項目には値 AppPage しか設定できません。 有効な値は、次のとおりです。
この項目は、API バージョン 32.0 以降で使用できます。 |
FlexiPageRegion
FlexiPageRegion は、ページ領域のプロパティを表します。範囲には、エンティティセットを範囲とすることができる、レコードリストコンポーネントまたは最近使ったデータコンポーネントを含めることができます。
| 項目名 | 項目の型 | 説明 |
|---|---|---|
| appendable | RegionFlagStatus (string 型の列挙) | この値はコミュニティにおいて API バージョン 45.0 以降で使用できますが、他のすべての領域では将来の使用のために予約されています。 有効な値は、次のとおりです。
この項目は、replaceable および prependable と組み合わせて評価されます。
この項目は、API バージョン 35.0 以降で使用できます。 |
| componentInstances | ComponentInstance[] | コンポーネントインスタンスのプロパティと名前。 |
| mode | FlexiPageRegionMode (string 型の列挙) | この項目は、将来の使用のために予約されています。 有効な値は、次のとおりです。
この項目は、API バージョン 35.0 以降で使用できます。 |
| name | string | 必須。FlexiPage 範囲の一意の名前。 |
| prependable | RegionFlagStatus (string 型の列挙) | この値はコミュニティにおいて API バージョン 45.0 以降で使用できますが、他のすべての領域では将来の使用のために予約されています。 有効な値は、次のとおりです。
この項目は、appendable および replaceable と組み合わせて評価されます。
この項目は、API バージョン 35.0 以降で使用できます。 |
| replaceable | RegionFlagStatus (string 型の列挙) | この値はコミュニティにおいて API バージョン 45.0 以降で使用できますが、他のすべての領域では将来の使用のために予約されています。 有効な値は、次のとおりです。
この項目は、appendable および prependable と組み合わせて評価されます。
この項目は、API バージョン 35.0 以降で使用できます。 |
| type | FlexiPageRegionType (string 型の列挙) | 必須。FlexiPage 範囲の種別。 有効な値は、次のとおりです。
この項目は、API バージョン 35.0 以降で使用できます。 |
ComponentInstance
フィルタリストなど、ページ内のコンポーネントのインスタンス。
| 項目名 | 項目の型 | 説明 |
|---|---|---|
| componentInstanceProperties | ComponentInstanceProperty[] | コンポーネントインスタンスの単一プロパティの値。 |
| componentName | string | 必須。コンポーネントの単一インスタンスの名前。 |
| visibilityRule | UiFormulaRule | コンポーネントをページ上に表示する条件を定義する 1 つ以上の条件のセット。 ルールが true と評価されると、コンポーネントがページに表示されます。false の場合は表示されません。この項目が null の場合、デフォルトではコンポーネントが表示されます。 この項目は、API バージョン 41.0 以降で使用できます。 |
ComponentInstanceProperty
コンポーネントインスタンスの単一プロパティの値。
| 項目名 | 項目の型 | 説明 |
|---|---|---|
| name | string | コンポーネントインスタンス内で一意のプロパティ名。Lightning コンポーネントでは、この値は .cmp ファイルで定義される <aura:attribute> です。 |
| type | ComponentInstancePropertyTypeEnum (string 型の列挙) |
この項目値が null の場合、ComponentInstanceProperty の値が Lightning コンポーネントに適用されます。この項目値が decorator の場合、ComponentInstanceProperty の値が Lightning コンポーネントのコンポーネントデコレータに適用されます。 コンポーネントデコレータは、Lightning コンポーネントを囲むラッパーです。このデコレータでは、Lightning Experience に特定のページを表示するときに、他の機能をコンポーネントに適用できます。たとえば、Lightning Experience ユーティリティバー上のコンポーネントを囲むコンポーネントデコレータを設定して、開いたときのコンポーネントの高さや幅を設定できます。UtilityBar は、コンポーネントデコレータをサポートする唯一のページ種別です。 この項目は、API バージョン 38.0 以降で使用できます。 |
| value | string | プロパティの参照または値。 [関連リスト] コンポーネントを定義する場合、親レコードを使用するには、parentFieldApiName 値を object.field_name に設定します。親レコードを使用しない場合は、値を object.Id に設定します。 |
- Standard.Tab.activity
- Standard.Tab.collaborate
- Standard.Tab.detail
- Standard.Tab.feed
- Standard.Tab.preview
- Standard.Tab.relatedLists
1<componentInstances>
2 <componentInstanceProperties>
3 <name>title</name>
4 <value>Standard.Tab.activity</value>
5 </componentInstanceProperties>
6 <componentName>flexipage:tab</componentName>
7</componentInstances>UiFormulaRule
コンポーネントを Lightning ページ上に表示する条件を定義する 1 つ以上の条件のセット。たとえば、[金額] が $1,000,000 よりも大きいとき、商談ページにリッチテキストコンポーネントを表示する条件を作成できます。API バージョン 41.0 以降で利用できます。
| 項目名 | 項目の型 | 説明 |
|---|---|---|
| booleanFilter | string | 高度な検索条件を指定します (1 AND 2 など)。 |
| criteria | UiFormulaCriterion[] | 評価時にコンポーネントの表示を決定する 1 つ以上の条件のリスト。 |
FlexiPageTemplateInstance
FlexiPageTemplateInstance は Lightning ページテンプレートのインスタンスを表します。
| 項目名 | 項目の型 | 説明 |
|---|---|---|
| name | string | 必須。テンプレートの単一インスタンスの名前。 |
| properties | ComponentInstanceProperty[] |
テンプレートインスタンスの単一プロパティの値。 CommThemeLayoutPage でのみ有効。ページテンプレートに関連付けられている各テーマレイアウトプロパティの名前と値のペアが含まれます。コミュニティビルダーでは、テーマレイアウトとそのプロパティは [テーマ] 領域に表示されます。 |
PlatformActionList
Lightning アプリケーションページに表示されるアクションとその順序のリストを表す PlatformActionList。API バージョン 34.0 以降で利用できます。
| 項目名 | 項目の型 | 説明 |
|---|---|---|
| actionListContext | PlatformActionListContext (string 型の列挙) | 必須。アクションリストのコンテキスト。有効な値は、次のとおりです。
|
| platformActionListItems | PlatformActionListItem[] | PlatformActionList のアクション。 |
| relatedSourceEntity | string | ActionListContext が RelatedList または RelatedListRecord の場合、この項目はアクションが属する関連リストの API 名を表します。 |
PlatformActionListItem
PlatformActionListItem は PlatformActionList のアクションを表します。API バージョン 34.0 以降で利用できます。
| 項目名 | 項目の型 | 説明 |
|---|---|---|
| actionName | string | 必須。リストのアクションの API 参照名。 |
| actionType | PlatformActionType (string 型の列挙) | 必須。アクションの種別。有効な値は、次のとおりです。
|
| sortOrder | int | 必須。リスト内のアクションの位置。 |
| subtype | string | アクションのサブタイプ。クイックアクションの場合、サブタイプは QuickActionType になります。カスタムボタンの場合、サブタイプは WebLinkTypeEnum になります。アクションリンクの場合、サブタイプは Api、ApiAsync、Download、Ui になります。標準ボタンおよび生産性アクションには、サブタイプはありません。 |
UiFormulaCriterion
評価時に Lightning ページのコンポーネントの表示を定義する 1 つの条件。API バージョン 41.0 以降で利用できます。
| 項目名 | 項目の型 | 説明 |
|---|---|---|
| leftValue | string | 必須。条件のベースとなる項目。たとえば、AMOUNT のようになります。 |
| operator | string | 必須。データを絞り込むために使用される演算子を定義します。有効な値は、次のとおりです。
|
| rightValue | string | コンポーネントの表示を評価する値。たとえば、1000000 です。 |
- {!$Client.FormFactor} — ページを表示するデバイスに基づいてコンポーネントの表示を制御するには、この式を使用します。有効な値は Small (電話)、Medium (タブレット)、Large (Lightning Experience デスクトップ) です。アプリケーションページでのみサポートされます。
- {!$Permission.CustomPermission.permissionName} — Lightning ページを参照しているユーザのカスタム権限に基づいてコンポーネントの表示を制御するには、この式を使用します。アプリケーション、ホーム、およびレコードページでのみサポートされます。
- {!$Permission.StandardPermission.permissionName} — Lightning ページを参照しているユーザの標準権限に基づいてコンポーネントの表示を制御するには、この式を使用します。アプリケーション、ホーム、およびレコードページでのみサポートされます。
- {!Record.field} — レコードページでのみサポートされます。
- {!$User.field} — アプリケーション、ホーム、およびレコードページでのみサポートされます。
たとえば、電話に表示する場合にのみコンポーネントを表示するには、条件 {!$Client.FormFactor} EQUAL "SMALL" を追加します。また、システム管理者にのみコンポーネントを表示するには、{!$User.Profile.Name} EQUAL "System Administrator" を使用します。
コンポーネントの表示ルール内の式は 5 個の項目までまたがることができます。たとえば、{!Record.Account.Owner.Manager.Manager.Manager.LastName} は、6 個の項目にまたがっているためサポートされません。
宣言的なメタデータの定義のサンプル
1<?xml version="1.0" encoding="UTF-8"?>
2<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
3 <componentInstances>
4 <componentInstanceProperties>
5 <name>collapsed</name>
6 <value>false</value>
7 </componentInstanceProperties>
8 <componentInstanceProperties>
9 <name>numVisibleActions</name>
10 <value>3</value>
11 </componentInstanceProperties>
12 <componentName>force:highlightsPanel</componentName>
13 </componentInstances>
14 <flexiPageRegions>
15 <appendable>disabled</appendable>
16 <name>header</name>
17 <prependable>disabled</prependable>
18 <replaceable>disabled</replaceable>
19 <type>Region</type>
20 </flexiPageRegions>
21 <flexiPageRegions>
22 <appendable>enabled</appendable>
23 <componentInstances>
24 <componentName>forceCommunity:fileDetailPage</componentName>
25 </componentInstances>
26 <name>content</name>
27 <prependable>enabled</prependable>
28 <replaceable>enabled</replaceable>
29 <type>Region</type>
30 </flexiPageRegions>
31 <flexiPageRegions>
32 <name>footer</name>
33 <type>Region</type>
34 </flexiPageRegions>
35
36 <flexiPageRegions>
37 <componentInstances>
38 <componentName>force:detailPanel</componentName>
39 </componentInstances>
40 <name>facet-82dce3a7-1222-4948-8b41-533cdd60aaa4</name>
41 <type>Facet</type>
42 </flexiPageRegions>
43 <flexiPageRegions>
44 <componentInstances>
45 <componentName>runtime_sales_activities:activityPanel</componentName>
46 </componentInstances>
47 <name>facet-4bdf038a-4568-4c4e-b220-b5ec47f656e9</name>
48 <type>Facet</type>
49 </flexiPageRegions>
50 <flexiPageRegions>
51 <componentInstances>
52 <componentName>wits:newsPanel</componentName>
53 </componentInstances>
54 <name>facet-8d5ecfff-4590-49c0-a09e-3df84179f642</name>
55 <type>Facet</type>
56 </flexiPageRegions>
57 <flexiPageRegions>
58 <componentInstances>
59 <componentName>force:relatedListContainer</componentName>
60 </componentInstances>
61 <name>facet-551d8770-5093-4222-927e-9138061ebbbf</name>
62 <type>Facet</type>
63 </flexiPageRegions>
64 <flexiPageRegions>
65 <componentInstances>
66 <componentInstanceProperties>
67 <name>body</name>
68 <value>facet-82dce3a7-1222-4948-8b41-533cdd60aaa4</value>
69 </componentInstanceProperties>
70 <componentInstanceProperties>
71 <name>title</name>
72 <value>Standard.Tab.detail</value>
73 </componentInstanceProperties>
74 <componentName>flexipage:tab</componentName>
75 </componentInstances>
76 <componentInstances>
77 <componentInstanceProperties>
78 <name>body</name>
79 <value>facet-4bdf038a-4568-4c4e-b220-b5ec47f656e9</value>
80 </componentInstanceProperties>
81 <componentInstanceProperties>
82 <name>title</name>
83 <value>Standard.Tab.activity</value>
84 </componentInstanceProperties>
85 <componentName>flexipage:tab</componentName>
86 </componentInstances>
87 <componentInstances>
88 <componentInstanceProperties>
89 <name>body</name>
90 <value>facet-8d5ecfff-4590-49c0-a09e-3df84179f642</value>
91 </componentInstanceProperties>
92 <componentInstanceProperties>
93 <name>title</name>
94 <value>Recent Items</value>
95 </componentInstanceProperties>
96 <componentName>flexipage:tab</componentName>
97 </componentInstances>
98 <componentInstances>
99 <componentInstanceProperties>
100 <name>active</name>
101 <value>true</value>
102 </componentInstanceProperties>
103 <componentInstanceProperties>
104 <name>body</name>
105 <value>facet-551d8770-5093-4222-927e-9138061ebbbf</value>
106 </componentInstanceProperties>
107 <componentInstanceProperties>
108 <name>title</name>
109 <value>Standard.Tab.relatedLists</value>
110 </componentInstanceProperties>
111 <componentName>flexipage:tab</componentName>
112 </componentInstances>
113 <name>facet-f433d4c6-94e6-4de4-90fc-83501abf3536</name>
114 <type>Facet</type>
115 </flexiPageRegions>
116 <flexiPageRegions>
117 <componentInstances>
118 <componentInstanceProperties>
119 <name>tabs</name>
120 <value>facet-f433d4c6-94e6-4de4-90fc-83501abf3536</value>
121 </componentInstanceProperties>
122 <componentName>flexipage:tabset</componentName>
123 </componentInstances>
124 <name>main</name>
125 <type>Region</type>
126 </flexiPageRegions>
127 <flexiPageRegions>
128 <componentInstances>
129 <componentInstanceProperties>
130 <name>hideUpdateButton</name>
131 <value>false</value>
132 </componentInstanceProperties>
133 <componentName>runtime_sales_pathassistant:pathAssistant</componentName>
134 </componentInstances>
135 <name>subheader</name>
136 <type>Region</type>
137 </flexiPageRegions>
138 <flexiPageRegions>
139 <componentInstances>
140 <componentInstanceProperties>
141 <name>decorate</name>
142 <value>true</value>
143 </componentInstanceProperties>
144 <componentInstanceProperties>
145 <name>richTextValue</name>
146 <value><div style="text-align: center;"><
147 span style="font-family:georgia,serif;"><
148 span style="font-size: 18px;"><b>
149 A million dollar opportunity closed! Oh yeah!</b><
150 /span></span></div></value>
151 </componentInstanceProperties>
152 <componentName>flexipage:richText</componentName>
153 <visibilityRule>
154 <booleanFilter>1 AND 2</booleanFilter>
155 <criteria>
156 <leftValue>{!Record.Amount}</leftValue>
157 <operator>GE</operator>
158 <rightValue>1000000</rightValue>
159 </criteria>
160 <criteria>
161 <leftValue>{!Record.StageName}</leftValue>
162 <operator>EQUAL</operator>
163 <rightValue>Closed Won</rightValue>
164 </criteria>
165 </visibilityRule>
166 </componentInstances>
167 <componentInstances>
168 <componentName>forceChatter:recordFeedContainer</componentName>
169 </componentInstances>
170 <name>sidebar</name>
171 <type>Region</type>
172 </flexiPageRegions>
173 <masterLabel>New Opportunity Page</masterLabel>
174 <sobjectType>Opportunity</sobjectType>
175 <template>
176 <name>flexipage:recordHomeWithSubheaderTemplateDesktop</name>
177 </template>
178 <type>RecordPage</type>
179</FlexiPage>FlexiPage コンポーネント定義を参照するサンプルの package.xml ファイルを次に示します。
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <fullName>New Opportunity Page Package</fullName>
4 <description>Contains an opportunity page with a rich text component that has rules assigned</description>
5 <types>
6 <members>New_Opportunity_Page</members>
7 <name>FlexiPage</name>
8 </types>
9 <version>41.0</version>
10</Package>マニフェストファイル内のワイルドカードのサポート
このメタデータ型では、package.xml マニフェストファイル内のワイルドカード文字 * (アスタリスク) がサポートされます。マニフェストファイルの使用についての詳細は、「zip ファイルを使用したメタデータのリリースと取得」を参照してください。