//
you're reading...
CRM Integration, Uncategorized

Faster and Safer Data Integration/Migration in CRM 2015 Update 1


Data Integration/Migration has always been a challenge in any Dynamics CRM implementation. The native Data Import utility cannot handle the complex data migration/integration specially with complex relationships between different entities. For a long time developers have been writing applications or SSIS packages for data integration using the CRM SDK. One of the fundamental challenge with CRM SDK has been that message execution were not transnational i.e. there was no rollback possible.

Let’s take the following scenario. We need to create a contact and then associate it with its parent account records as primary contact. There are two transactions: CREATE of Contact and UPDATE of Account. With ExecuteMultipleRequest command of SDK, it was possible to send both these messages together to CRM for execution. But what was not possible was to rollback the whole transaction if the CREATE succeeds but the UPDATE fails.

Dynamics CRM 2015 Update 1 SDK has introduced ExecuteTransactionRequest which allows to execute multiple requests in a transaction, which means if any one of these requests execution fails the whole transaction will be rolled back.

By definition, a transaction is a sequence of operations performed as a single logical unit of work. Transaction is fundamental for data integrity and transactions must exhibit Atomicity, Consistency, Isolation, and Durability (ACID) properties, to qualify as a transaction.

The following code illustrates how ExecuteTransactionRequest can be used:

ExecuteTransationRequest

 

 

 

 

The Transnational batch works on the following principles:

  • It executes two or more organization service requests in a single database transaction.
  • The message requests in the Requests collection are executed in order as they appear in the collection, where the element at index 0 is executed first.
  • If any one of the requests fail and the transaction is rolled back, any data changes completed during the transaction are undone.
  • Set ReturnResponses to true to get back a collection of responses.
  • The maximum allowed Batch size is 100 i.e. up to 100 requests per transaction request is allowed.
  • CRM online has a throttling of 2 concurrent batch requests. If we send more than 2 simultaneous batch requests to CRM online server, we will get an error indicating the server is busy.
  • We can mix CreateRequest and UpdateRequest in the same Transactional Request batch.

The

About Dipankar Bhattacharya

Dipankar is a CITA-F, ITIL certified professional specializing Customer Relationship Management (CRM) and Cloud Computing. He is a certified Microsoft Dynamics CRM specialist and Architect and have been working in the field of CRM for enterprise customers across the globe.

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog Stats

  • 61,049 hits

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 565 other followers

My Book

Follow me on Twitter

%d bloggers like this: