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

SObject Tree リクエストボディ

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

SObject Tree Collection Input

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

SObject Tree Input

sObject ツリーは、他の sObject ツリーとして表されるルートレコード、そのデータ、およびその子レコードが含まれる再帰的データ構造です。
JSON の例
1{
2"attributes" : {"type" : "Account", "referenceId" : "ref1"},
3"name" : "SampleAccount",
4"phone" : "1234567890",
5"website" : "www.salesforce.com",
6"NumberOfEmployees" : "100",
7"type" : "Analyst",
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}
プロパティ
名前 説明 必須項目/省略可能
attributes コレクション このレコードの属性。attributes プロパティには 2 つのサブプロパティが含まれます。
  • type (必須) — このレコードのタイプ。
  • referenceId (必須) — このレコードの参照 ID。要求のコンテキスト内で一意であり、英数字で始まる必要があります。
必須項目
必須オブジェクト項目 項目に依存 このレコードの必須項目と項目値。 必須項目
省略可能なオブジェクト項目 項目に依存 このレコードの省略可能な項目と項目値。 省略可能
子リレーション SObject Tree Collection Input このレコードの子リレーション (取引先の子取引先責任者など)。子リレーションは、主従関係または参照関係になります。オブジェクトの有効な子リレーションを表示するには、SObject Describe リソースまたは Schema Builder を使用します。このプロパティの値は、子 sObject ツリーが含まれる SObject Tree Collection Input です。 省略可能