FlexiPage
- Salesforce アプリケーションでは、Lightning ページはナビゲーションメニューに表示されるアプリケーションのホームページです。
- Lightning Experience では、Lightning ページを次の目的で使用できます。
- レコードページ、Salesforce ホームページ、Outlook インテグレーションおよび Lightning for 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 バージョン 35.0 以降で使用できます。 |
| componentInstances | ComponentInstance[] | コンポーネントインスタンスのプロパティと名前。 |
| mode | FlexiPageRegionMode (string 型の列挙) | この項目は、将来の使用のために予約されています。 有効な値は、次のとおりです。
この項目は、API バージョン 35.0 以降で使用できます。 |
| name | string | 必須。FlexiPage 範囲の一意の名前。 |
| prependable | RegionFlagStatus (string 型の列挙) | この項目は、将来の使用のために予約されています。 有効な値は、次のとおりです。
この項目は、API バージョン 35.0 以降で使用できます。 |
| replaceable | RegionFlagStatus (string 型の列挙) | この項目は、将来の使用のために予約されています。 有効な値は、次のとおりです。
この項目は、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 個の項目にまたがっているためサポートされません。
宣言的なメタデータの定義のサンプル
次に、カスタム商談レコードページの XML FlexiPage コンポーネント定義の例を示します。これにはタブセットとリッチテキストコンポーネントが含まれ、リッチテキストコンポーネントには表示ルールが割り当てられています。
1<?xml version="1.0" encoding="UTF-8"?>
2<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata">
3 <flexiPageRegions>
4 <componentInstances>
5 <componentInstanceProperties>
6 <name>collapsed</name>
7 <value>false</value>
8 </componentInstanceProperties>
9 <componentInstanceProperties>
10 <name>numVisibleActions</name>
11 <value>3</value>
12 </componentInstanceProperties>
13 <componentName>force:highlightsPanel</componentName>
14 </componentInstances>
15 <name>header</name>
16 <type>Region</type>
17 </flexiPageRegions>
18 <flexiPageRegions>
19 <componentInstances>
20 <componentName>force:detailPanel</componentName>
21 </componentInstances>
22 <name>facet-82dce3a7-1222-4948-8b41-533cdd60aaa4</name>
23 <type>Facet</type>
24 </flexiPageRegions>
25 <flexiPageRegions>
26 <componentInstances>
27 <componentName>runtime_sales_activities:activityPanel</componentName>
28 </componentInstances>
29 <name>facet-4bdf038a-4568-4c4e-b220-b5ec47f656e9</name>
30 <type>Facet</type>
31 </flexiPageRegions>
32 <flexiPageRegions>
33 <componentInstances>
34 <componentName>wits:newsPanel</componentName>
35 </componentInstances>
36 <name>facet-8d5ecfff-4590-49c0-a09e-3df84179f642</name>
37 <type>Facet</type>
38 </flexiPageRegions>
39 <flexiPageRegions>
40 <componentInstances>
41 <componentName>force:relatedListContainer</componentName>
42 </componentInstances>
43 <name>facet-551d8770-5093-4222-927e-9138061ebbbf</name>
44 <type>Facet</type>
45 </flexiPageRegions>
46 <flexiPageRegions>
47 <componentInstances>
48 <componentInstanceProperties>
49 <name>body</name>
50 <value>facet-82dce3a7-1222-4948-8b41-533cdd60aaa4</value>
51 </componentInstanceProperties>
52 <componentInstanceProperties>
53 <name>title</name>
54 <value>Standard.Tab.detail</value>
55 </componentInstanceProperties>
56 <componentName>flexipage:tab</componentName>
57 </componentInstances>
58 <componentInstances>
59 <componentInstanceProperties>
60 <name>body</name>
61 <value>facet-4bdf038a-4568-4c4e-b220-b5ec47f656e9</value>
62 </componentInstanceProperties>
63 <componentInstanceProperties>
64 <name>title</name>
65 <value>Standard.Tab.activity</value>
66 </componentInstanceProperties>
67 <componentName>flexipage:tab</componentName>
68 </componentInstances>
69 <componentInstances>
70 <componentInstanceProperties>
71 <name>body</name>
72 <value>facet-8d5ecfff-4590-49c0-a09e-3df84179f642</value>
73 </componentInstanceProperties>
74 <componentInstanceProperties>
75 <name>title</name>
76 <value>Recent Items</value>
77 </componentInstanceProperties>
78 <componentName>flexipage:tab</componentName>
79 </componentInstances>
80 <componentInstances>
81 <componentInstanceProperties>
82 <name>active</name>
83 <value>true</value>
84 </componentInstanceProperties>
85 <componentInstanceProperties>
86 <name>body</name>
87 <value>facet-551d8770-5093-4222-927e-9138061ebbbf</value>
88 </componentInstanceProperties>
89 <componentInstanceProperties>
90 <name>title</name>
91 <value>Standard.Tab.relatedLists</value>
92 </componentInstanceProperties>
93 <componentName>flexipage:tab</componentName>
94 </componentInstances>
95 <name>facet-f433d4c6-94e6-4de4-90fc-83501abf3536</name>
96 <type>Facet</type>
97 </flexiPageRegions>
98 <flexiPageRegions>
99 <componentInstances>
100 <componentInstanceProperties>
101 <name>tabs</name>
102 <value>facet-f433d4c6-94e6-4de4-90fc-83501abf3536</value>
103 </componentInstanceProperties>
104 <componentName>flexipage:tabset</componentName>
105 </componentInstances>
106 <name>main</name>
107 <type>Region</type>
108 </flexiPageRegions>
109 <flexiPageRegions>
110 <componentInstances>
111 <componentInstanceProperties>
112 <name>hideUpdateButton</name>
113 <value>false</value>
114 </componentInstanceProperties>
115 <componentName>runtime_sales_pathassistant:pathAssistant</componentName>
116 </componentInstances>
117 <name>subheader</name>
118 <type>Region</type>
119 </flexiPageRegions>
120 <flexiPageRegions>
121 <componentInstances>
122 <componentInstanceProperties>
123 <name>decorate</name>
124 <value>true</value>
125 </componentInstanceProperties>
126 <componentInstanceProperties>
127 <name>richTextValue</name>
128 <value><div style="text-align: center;"><
129 span style="font-family:georgia,serif;"><
130 span style="font-size: 18px;"><b>
131 A million dollar opportunity closed! Oh yeah!</b><
132 /span></span></div></value>
133 </componentInstanceProperties>
134 <componentName>flexipage:richText</componentName>
135 <visibilityRule>
136 <booleanFilter>1 AND 2</booleanFilter>
137 <criteria>
138 <leftValue>{!Record.Amount}</leftValue>
139 <operator>GE</operator>
140 <rightValue>1000000</rightValue>
141 </criteria>
142 <criteria>
143 <leftValue>{!Record.StageName}</leftValue>
144 <operator>EQUAL</operator>
145 <rightValue>Closed Won</rightValue>
146 </criteria>
147 </visibilityRule>
148 </componentInstances>
149 <componentInstances>
150 <componentName>forceChatter:recordFeedContainer</componentName>
151 </componentInstances>
152 <name>sidebar</name>
153 <type>Region</type>
154 </flexiPageRegions>
155 <masterLabel>New Opportunity Page</masterLabel>
156 <sobjectType>Opportunity</sobjectType>
157 <template>
158 <name>flexipage:recordHomeWithSubheaderTemplateDesktop</name>
159 </template>
160 <type>RecordPage</type>
161</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>