Update REST Entity

The Update REST Entity activity is used to update entity records in the Microsoft Dynamics CRM server.

This activity supports updating multiple entity records at a time through successive REST API calls and not using REST batch API call. If you want to update a data collection in the Microsoft Dynamics CRM server, use the For-Each statement to map the data collection to the elements in the Input field in the Update REST Entity activity.

Note: Update REST Entity activity supports associating an entity which has single valued relationship with the entity being updated.

General

Establish a connection to the Microsoft Dynamics CRM server in the General tab, and specify the type of entity records you want to update.

The following table lists the configurations in the General tab of the Update REST Entity 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.

Dynamics CRM Entity

No

Specify the type of the entity record you want to update.

Click Fetch Entity to open the Entity Selection Dialog dialog that contains all the available entities. Select an entity from the list and click OK. The selected entity is automatically specified in this field.

After selecting the entity, click Build Schema to open the Attributes Selection Dialog dialog that contains Optional Input Attributes and Optional Output Attributes which are associated with the selected entity. Select the optional attributes that you want to update and select the optional output attributes that you want to be returned from the server. Click OK. The selected attributes are displayed in the Input and Output tabs.

Upsert Restriction

No

Provides three different options to update and/or insert the entity for a given ID:
  • None: Depending upon the existence of the ID that you enter, it will create or update the entity:
    • For non-existing entity ID, it will create a new entity.
    • For existing entity ID, it will update the entity.
    Note: By default, None is selected. If you want to change, select the option from Upsert Restriction drop-down.

    The details of the newly created or updated entity will be displayed in the Output tab.

  • Prevent Create: For an existing entity ID, it will only update the entity. For a non-existing entity ID, it will not create an entity.

    The details of the updated entity will be displayed in the Output tab.

  • Prevent Update: For an existing entity ID, it will not update the entity. For a non existing entity ID, it will create an entity. The details of the newly created entity will be displayed in the Output tab.

Description

In the Description tab, you can enter a short description for the Update REST Entity activity.

Input

The Input tab displays the input of this activity, which varies depending on the entity and attributes selected when configuring the General tab.

Note: Input values for multi-select type of attributes, introduced in Dynamics 365 V9, must be passed as comma separated integers of valid optionset options.

Output

In the Output tab, the ID of the updated entity is returned along with the output attributes which you have selected by clicking Build Schema in the General tab. The output field name varies depending on the type of updated entity record.

Fault

The Fault tab displays the error code and error message of the Update REST Entity activity. See Error Codes for a more detailed explanation of errors.

The following table lists error schema elements in the Fault tab of the Update REST Entity 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.