Using the Dynamics CRM Command Task

The Dynamics CRM Command Task is a control flow component that can be used to translate SQL scripts or commands into executable Dynamics 365/Dataverse service calls to perform actual data writes at SSIS control flow level.

There are two pages that can be configured:

  • General
  • Error Handling

General Page

The General page includes the general properties for the component.

Dynamics CRM Command Task - General.png

Connection Manager

The Connection Manager drop-down displays a list of all relevant connection managers that are available for your current SSIS package.

Batch Size For Reading

The Batch Size For Reading specifies the batch size to be used for reading.

Batch Size For Writing

The Batch Size For Writing specifies the batch size to be used for writing.

Enable Multithreaded Writing

Enabling this option allows you to specify the thread count for multithreaded service requests.

Command Text

The Command textbox is where you could specify the SQL command text that will be executed to perform an action against the connected Dynamics CRM instance. We support the following actions

  • Insert
  • Update
  • Delete

The Command textbox supports the use of User and System Variables. Simply select a variable under the SSIS Variables menu in the left-hand side panel, and a placeholder value will be inserted into the filter text.

Expression fx Button

Click the fx button to launch SSIS Expression Editor to enable dynamic updates of the property at run time.

Error Handling Page

The Error Handling page can be used to handle errors.

Dynamics CRM Command Task - Error Handling.png

Fail on error

When chosen, will fail the component on error.

Ignore error (continue on error)

Ignores the error and continues the task.

Write execution summary to variable

Enable this option to write the execution summary to a variable. You could click on the "New Variable" option to create one as well if you do not already have a dedicated variable created for this option.

Dynamics CRM Command Task - Add Variable.png

This created a User variable that can be found in your SSIS variable list.