Execute Batch Operations REST

The Execute Batch Operations REST activity is used to add, update, and delete entity records in the Microsoft Dynamics CRM server.

This activity supports adding, updating and deleting multiple entity records at a time through using a REST batch API call.
Note: The Execute Batch Operations REST activity is treated as a single operation. If any of the operations within the Execute Batch Operations REST activity fails, the remaining operations are rolled back and the activity faults.

General

In the General tab, you can establish a connection to the Microsoft Dynamics CRM server, and specify the type of entity records or specific attributes of an entity for which you want to execute a batch request.

The following table lists the configurations in the General tab of the Execute Batch Request REST activity:

Field Module Property? Description
Name

No

Specify the name of the activity in the process definition.
Dynamics CRM REST Connection

Yes

Specify a shared connection resource.

Click the icon to select a Dynamics CRM REST connection. If no matching Dynamics CRM REST connections are found, click Create Shared Resource in the Select DynamicscrmRestResource Resource Template dialog to create one. See Creating a Dynamics CRM REST Connection for more details.

Build Batch Request No

Build a batch request.

To build a batch request:
  1. Click the Build Batch Request button.

  2. In the Batch Request Builder dialog box that opens, from the Select Operation drop-down list, select the operation you want to perform, such as create, update, or delete operation.
    Note: If you select update operation, Upsert Restriction is displayed and you can select None, Prevent Create, or Prevent Update. By default, None is selected.
    Note: For delete operation, in Optional Input Attributes, you can select and delete only one attribute of any entity.
  3. In the Select Entity list, select the entity on which you want to perform the operation. If required, select input attributes in the Optional Input Attributes list.
  4. Click Add.

    The operation is added as an entry (batch item) in the List of Operations for Batch table.

    Note: If you want to edit or delete an entry (batch item) in the List of Operations for Batch table, select the entry and click the Edit or Delete button and make the required change. You can select only one entry and edit at a time. You can however select multiple entries and delete at a time.
  5. After adding all the operations you want to perform in the batch, click Confirm Batch to generate the input and output schema for the batch items.
  6. Click Save.

Description

In the Description tab, you can enter a short description for the Execute Batch Operation REST activity.

Input

In the Input tab, the input of this activity is displayed. The input varies depending on the type of operation, entity, and attributes selected in the Batch Request Builder dialog box in the General tab.

The input schema has as many number of operations as were configured using the Batch Request Builder dialog box and the order of the operations is maintained as seen in the dialog box.

Output

In the Output tab, the corresponding entity IDs for the operations in the batch are returned. The output varies depending on the type of operations and entities.

The output schema has as many number of operations as were configured using the Batch Request Builder dialog box and the order of the operations is maintained as seen in the dialog box.

Fault

The error code and error message of the Execute Batch Operation REST activity are displayed in the Fault tab. See Error Codes for a more detailed explanation of errors.

The following table lists error schema elements in the Fault tab of the Execute Batch Operation REST activity:

Error Schema Element Data Type Description
message String The error message returned by the plug-in.
messageCode String The error code returned by the plug-in.