ContextDefinition
親種別
ファイルのサフィックスおよびディレクトリの場所
ContextDefinition コンポーネントにはサフィックス .contextDefinition が付けられ、contextDefinitions フォルダーに保存されます。
バージョン
ContextDefinition コンポーネントは、API バージョン 59.0 以降で使用できます。
特別なアクセスルール
コンテキストサービスが ContextDefinition メタデータ型にアクセスできるようにします。
項目
| 項目名 | 説明 |
|---|---|
| contextDefinitionVersions |
|
| contextTtl |
|
| description |
|
| isProtected |
|
| masterLabel |
|
| title |
|
ContextDefinitionVersion
コンテキスト定義バージョンに関する詳細を表します。一度に有効にできるバージョンは 1 つのみです。
| 項目名 | 説明 |
|---|---|
| contextMappings |
|
| contextNodes |
|
| endDate |
|
| isActive |
|
| startDate |
|
| versionNumber |
|
ContextMapping
属性とノードの関連オブジェクトへのマッピングを表します。
| 項目名 | 説明 |
|---|---|
| contextNodeMappings |
|
| default |
|
| description |
|
| title |
|
ContextNodeMapping
コンテキストのノードと入力スキーマの値との関係を表します。
| 項目名 | 説明 |
|---|---|
| contextAttributeMappings |
|
| contextNode |
|
| object |
|
ContextAttributeMapping
コンテキストで定義された属性と関連オブジェクトの値の関係を表します。
| 項目名 | 説明 |
|---|---|
| contextAttrHydrationDetails |
|
| contextAttribute |
|
| contextInputAttributeName |
|
ContextAttrHydrationDetail
入力スキーマから選択した属性のデータを取得する SOQL (データベース) クエリを表します。
| 項目名 | 説明 |
|---|---|
| contextAttrHydrationDetails |
|
| objectName |
|
| queryAttribute |
|
ContextNode
コンテキスト内のノードの構造の詳細を表します。各ノードは、それらに関連する他のノードと、オブジェクトを記述する属性を持つことができます。ノードの階層を定義することもできます。
| 項目名 | 説明 |
|---|---|
| contextAttributes |
|
| contextTags |
|
| title |
|
| transposable |
|
ContextAttribute
コンテキストノードを記述するために使用される属性の詳細を表します。各ノードには、1 つ以上の関連する属性を含めることができます。
| 項目名 | 説明 |
|---|---|
| contextTags |
|
| dataType |
|
| domainSet |
|
| fieldType |
|
| key |
|
| title |
|
| value |
|
宣言的なメタデータの定義のサンプル
ContextDefinition コンポーネントの例を次に示します。
1<?xml version="1.0" encoding="UTF-8"?>
2<ContextDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
3 <fullName>SampleContextDefinition</fullName>
4 <contextDefinitionVersions>
5 <contextMappings>
6 <contextNodeMappings>
7 <contextAttributeMappings>
8 <contextAttrHydrationDetails>
9 <objectName>CustomAccount__c</objectName>
10 <queryAttribute>Name</queryAttribute>
11 </contextAttrHydrationDetails>
12 <contextAttribute>AccountName</contextAttribute>
13 <contextInputAttributeName>AccountName</contextInputAttributeName>
14 </contextAttributeMappings>
15 <contextAttributeMappings>
16 <contextAttrHydrationDetails>
17 <objectName>CustomAccount__c</objectName>
18 <queryAttribute>CustomAccountName__c</queryAttribute>
19 </contextAttrHydrationDetails>
20 <contextAttribute>CustomAccountName</contextAttribute>
21 <contextInputAttributeName>CustomAccountName</contextInputAttributeName>
22 </contextAttributeMappings>
23 <contextNode>SampleContextNode</contextNode>
24 <object>CustomAccount__c</object>
25 </contextNodeMappings>
26 <default>true</default>
27 <title>CustomAccountMapping</title>
28 </contextMappings>
29 <contextMappings>
30 <contextNodeMappings>
31 <contextAttributeMappings>
32 <contextAttrHydrationDetails>
33 <objectName>Account</objectName>
34 <queryAttribute>Name</queryAttribute>
35 </contextAttrHydrationDetails>
36 <contextAttribute>AccountName</contextAttribute>
37 <contextInputAttributeName>AccountName</contextInputAttributeName>
38 </contextAttributeMappings>
39 <contextAttributeMappings>
40 <contextAttrHydrationDetails>
41 <objectName>Account</objectName>
42 <queryAttribute>CustomAccountName__c</queryAttribute>
43 </contextAttrHydrationDetails>
44 <contextAttribute>CustomAccountName</contextAttribute>
45 <contextInputAttributeName>CustomAccountName</contextInputAttributeName>
46 </contextAttributeMappings>
47 <contextNode>SampleContextNode</contextNode>
48 <object>Account</object>
49 </contextNodeMappings>
50 <description>Account Mapping</description>
51 <default>false</default>
52 <title>AccountMapping</title>
53 </contextMappings>
54 <contextNodes>
55 <contextAttributes>
56 <contextTags>
57 <title>AccountName</title>
58 </contextTags>
59 <dataType>string</dataType>
60 <fieldType>inputoutput</fieldType>
61 <key>false</key>
62 <title>AccountName</title>
63 <value>false</value>
64 </contextAttributes>
65 <contextAttributes>
66 <dataType>string</dataType>
67 <fieldType>inputoutput</fieldType>
68 <key>false</key>
69 <title>CustomAccountName</title>
70 <value>false</value>
71 </contextAttributes>
72 <contextTags>
73 <title>SampleContextTag</title>
74 </contextTags>
75 <title>SampleContextNode</title>
76 <transposable>false</transposable>
77 </contextNodes>
78 <endDate>2097-05-10 00:00:00</endDate>
79 <startDate>2023-05-10 00:00:00</startDate>
80 <versionNumber>1</versionNumber>
81 <isActive>true</isActive>
82 </contextDefinitionVersions>
83 <description>Sample Description</description>
84 <contextTtl>10</contextTtl>
85 <isProtected>false</isProtected>
86 <masterLabel>Sample Label</masterLabel>
87 <title>Sample Title</title>
88</ContextDefinition>前の定義を参照する package.xml の例を次に示します。
1<Package xmlns="http://soap.sforce.com/2006/04/metadata">
2 <types>
3 <members>Test</members>
4 <name>ContextDefinition</name>
5 </types>
6 <types>
7 <members>Account.CustomAccountName__c</members>
8 <name>CustomField</name>
9 </types>
10 <types>
11 <members>CustomAccount__c</members>
12 <name>CustomObject</name>
13 </types>
14 <version>59.0</version>
15</Package>マニフェストファイル内のワイルドカードのサポート
このメタデータ型では、package.xml マニフェストファイル内のワイルドカード文字 * (アスタリスク) がサポートされます。マニフェストファイルの使用についての詳細は、「zip ファイルを使用したメタデータのリリースと取得」を参照してください。