---
sourceDocument: Xanadu API リファレンス
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - ja-JP

ft:publication_title :

    - Xanadu API リファレンス

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# insertMultiple

# insertMultiple {#ariaid-title1}

* リリースバージョン: Xanadu
* 
* 更新日 2024年08月01日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：6分

URL でターゲットとなるテーブルの複数の新規レコードを作成します。

## 入力フィールド

insertMultiple 要素には、システムフィールドを除くターゲットテーブルのすべてのフィールドを含む 1 つ以上のレコードタグを含めることができます。1 回の操作で挿入されるレコードの数は 200 以下に制限してください。増加してもインスタンスのパフォーマンスに悪影響を及ぼさない場合は、その後のエクスポートでこの数を徐々に増やすことができます。

## 出力フィールド

`insertMultipleResponse` タグの後に、次を含む 1 つ以上のレコードタグが続きます。
{#r_InsertMultiple__table_nohead_insert__entry__2}

| テーブルのタイプ | 出力フィールド |
|-|-|
| 正規 | sys_id フィールドとターゲットテーブル (`table`) の表示値が返されます。 |
| インポートセット | インポートセット行の sys_id、変換されたターゲットテーブル (`table`) の名前、変換されたターゲットテーブルの display_name、変換されたターゲット行の display_value、および status フィールド (inserted、updated、または error)。 `status=error` の場合は、オプションの status_message フィールドまたは error_message フィールド値を指定できます。 挿入によってターゲット行が変換されなかった (キー値が指定されていないためにスキップされた) 場合、sys_id フィールドには、ターゲットの変換テーブルではなくインポートセット行の sys_id が含まれます。 |
| 複数の変換を含むインポートセット | このタイプの挿入からの応答には、`multiInsertResponse` 親要素にラップされた通常のインポートセットテーブル挿入からの複数のフィールドセットが含まれます。各セットには、どの変換マップが応答を作成したかを示す map フィールドが含まれています。 |
[表 : 1. メソッド出力フィールドの挿入]

{#r_InsertMultiple__table_insert}

## 通常のテーブルのサンプル SOAP メッセージ

次の例は、簡単な説明のみを指定する挿入を示しています。  

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inc="http://www.service-now.com/incident">
       <soapenv:Header/>
       <soapenv:Body>
          <inc:insertMultiple>
             <record>
                <short_description>this is test 1</short_description>
             </record>
             <record>
                <short_description>this is test 2</short_description>
             </record>
             <record>
                <short_description>this is test 3</short_description>
             </record>
          </inc:insertMultiple>
       </soapenv:Body>
    </soapenv:Envelope>

結果として生じる応答は、次のようになります。  

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inc="http://www.service-now.com/incident">
       <soapenv:Header/>
       <soapenv:Body>
          <insertMultipleResponse>
             <insertResponse>
                <sys_id>168160ad4a36231200a89091281dc803</sys_id>
                <number>INC0055180</number>
             </insertResponse>
             <insertResponse>
                <sys_id>1681622e4a36231200a8909115e5c388</sys_id>
                <number>INC0055181</number>
             </insertResponse>
             <insertResponse>
                <sys_id>1681626e4a36231200a89091fa3c0aa8</sys_id>
                <number>INC0055182</number>
             </insertResponse>
          </insertMultipleResponse>
       </soapenv:Body>
    </soapenv:Envelope>

## インポートセットテーブルのサンプル SOAP メッセージ

次の例は、簡単な説明のみを指定する挿入を示しています。  

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:imp="http://www.service-now.com/imp_notification">
       <soapenv:Header/>
       <soapenv:Body>
          <imp:insertMultiple>:-->
             <imp:record>
                <imp:message>one</imp:message>
                <imp:uuid>a</imp:uuid>
             </imp:record>
             <imp:record>
                <imp:message>two</imp:message>
                <imp:uuid>b</imp:uuid>
             </imp:record>
             <imp:record>
                <imp:message>three</imp:message>
                <imp:uuid>c</imp:uuid>
             </imp:record>
          </imp:insertMultiple>
       </soapenv:Body>
    </soapenv:Envelope>

結果として生じる応答は、次のようになります。  

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:imp="http://www.service-now.com/imp_notification">
       <soapenv:Header/>
       <soapenv:Body>
          <insertMultipleResponse>
             <insertResponse>
                <sys_id>1296b3ab0a0a0b5b73e966fbfab7acde</sys_id>
                <table>incident</table>
                <display_name>number</display_name>
                <display_value>INC0010033</display_value>
                <status>ignored</status>
                <status_message>No field values changed</status_message>
             </insertResponse>
             <insertResponse>
                <sys_id>1296b48e0a0a0b5b62513bb5974a7d96</sys_id>
                <table>incident</table>
                <display_name>number</display_name>
                <display_value>INC0010034</display_value>
                <status>ignored</status>
                <status_message>No field values changed</status_message>
             </insertResponse>
             <insertResponse>
                <sys_id>1296b58b0a0a0b5b468f534659538b9a</sys_id>
                <table>incident</table>
                <display_name>number</display_name>
                <display_value>INC0010035</display_value>
                <status>ignored</status>
                <status_message>No field values changed</status_message>
             </insertResponse>
          </insertMultipleResponse>
       </soapenv:Body>
    </soapenv:Envelope>


