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

sObject Tree リクエストボディ

sObject Tree リソースを使用して作成���る sObject ツリーのコレクションを記述します。

可能な場合は、Equality の会社の値に一致するように、含めない用語を変更しました。顧客の実装に対する影響を回避するために、一部の用語は変更されていません。

重要

sObject Tree Collection Input

このリクエストボディには、sObject ツリーで構成される records コレクションが含まれます。
プロパティ
名前 説明 必須か省略可能
records sObject Tree Input[] 作成するレコードツリーのコレクション。各ツリーのルートレコードタイプは、sObject Tree URI に指定された sObject に対応する必要があります。 必須
ルート XML タグ
<SObjectTreeRequest>
JSON の例
1{
2"records" :[{
3    "attributes" : {"type" : "Account", "referenceId" : "ref1"},
4    "name" : "SampleAccount",
5    "phone" : "1234567890",
6    "website" : "www.salesforce.com",
7    "numberOfEmployees" : "100",
8    "industry" : "Banking",
9    "Contacts" : {
10      "records" : [{
11         "attributes" : {"type" : "Contact", "referenceId" : "ref2"},
12         "lastname" : "Smith",
13         "title" : "President",
14         "email" : "sample@salesforce.com"
15         },{         
16         "attributes" : {"type" : "Contact", "referenceId" : "ref3"},
17         "lastname" : "Evans",
18         "title" : "Vice President",
19         "email" : "sample@salesforce.com"
20         }]
21      }
22    },{
23    "attributes" : {"type" : "Account", "referenceId" : "ref4"},
24    "name" : "SampleAccount2",
25    "phone" : "1234567890",
26    "website" : "www.salesforce2.com",
27    "numberOfEmployees" : "100",
28    "industry" : "Banking"
29     }]
30}
XML の例
1<SObjectTreeRequest>
2    <records type="Account" referenceId="ref1">
3        <name>SampleAccount</name>
4        <phone>1234567890</phone>
5	       <website>www.salesforce.com</website>
6	       <numberOfEmployees>100</numberOfEmployees>
7	       <industry>Banking</industry>
8	       <Contacts>
9	           <records type="Contact" referenceId="ref2">
10	               <lastname>Smith</lastname>
11		              <title>President</title>
12		              <email>sample@salesforce.com</email>
13	           </records>
14	           <records type="Contact" referenceId="ref3">
15	  	            <lastname>Evans</lastname>
16	  	            <title>Vice President</title>
17	  	            <email>sample@salesforce.com</email>
18	           </records>
19	       </Contacts>
20    </records>
21    <records type="Account" referenceId="ref4">
22        <name>SampleAccount2</name>
23	       <phone>1234567890</phone>
24	       <website>www.salesforce2.com</website>
25	       <numberOfEmployees>100</numberOfEmployees>
26	       <industry>Banking</industry>
27    </records>
28</SObjectTreeRequest>

sObject Tree Input

sObject ツリーは、他の sObject ツリーとして表されるルートレコード、そのデータ、およびその子レコードが含まれる再帰的データ構造です。
プロパティ
名前 説明 必須か省略可能
attributes コレクション このレコードの属性。attributes プロパティには 2 つのサブプロパティが含まれます。
  • type (必須) — このレコードのタイプ。
  • referenceId (必須) — このレコードの参照 ID。要求のコンテキスト内で一意であり、英数字で始まる必要があります。
XML で、records 要素内に属性を含めます。
必須
必須オブジェクト項目 項目に依存 このレコードの必須項目と項目値。 必須
省略可能なオブジェクト項目 項目に依存 このレコードの省略可能な項目と項目値。 省略可能
子リレーション sObject Tree Collection Input このレコードの子リレーション (取引先の子取引先責任者など)。子リレーションは、主従関係または参照関係になります。オブジェクトの有効な子リレーションを表示するには、sObject Describe リソースまたは Schema Builder を使用します。このプロパティの値は、子 sObject ツリーが含まれる sObject Tree Collection Input です。 省略可能
ルート XML タグ
<records>
JSON の例
1{
2"attributes" : {"type" : "Account", "referenceId" : "ref1"},
3"name" : "SampleAccount",
4"phone" : "1234567890",
5"website" : "www.salesforce.com",
6"NumberOfEmployees" : "100",
7"industry" : "Banking",
8"Contacts" : {
9  "records" : [{
10     "attributes" : {"type" : "Contact", "referenceId" : "ref2"},
11     "lastname" : "Smith",
12     "title" : "President",
13     "email" : "sample@salesforce.com"
14      },{         
15     "attributes" : {"type" : "Contact", "referenceId" : "ref3"},
16     "lastname" : "Evans",
17     "title" : "Vice President",
18     "email" : "sample@salesforce.com"
19     }]
20  }
21}
XML の例
1<records type="Account" referenceId="ref1">
2    <name>SampleAccount</name>
3    <phone>1234567890</phone>
4    <website>www.salesforce.com</website>
5    <numberOfEmployees>100</numberOfEmployees>
6    <industry>Banking</industry>
7    <Contacts>
8        <records type="Contact" referenceId="ref2">
9	           <lastname>Smith</lastname>
10	           <title>President</title>
11	           <email>sample@salesforce.com</email>
12	       </records>
13	       <records type="Contact" referenceId="ref3">
14     	      <lastname>Evans</lastname>
15     	      <title>Vice President</title>
16     	      <email>sample@salesforce.com</email>
17	       </records>
18    </Contacts>
19</records>