Dynamics CRM 2015 Update 1 Series (7): Message transactions, dynamicscrm

Source: Internet
Author: User

Dynamics CRM 2015 Update 1 Series (7): Message transactions, dynamicscrm

Dynamics CRM 2015 Update1 can now put multiple messages in the same transaction pipeline for execution. This is indeed an excellent Feature, so that we can flexibly combine different messages to achieve complex business needs without worrying about rollback details after processing failure.
The method is also very simple. Call the ExecuteTransactionRequest message, put the message to be put into the transaction, and submit it to the server for unified execution. Let's take a look at the following code snippet:

ExecuteTransactionRequest req = new ExecuteTransactionRequest (); req. requests = new OrganizationRequestCollection (); DeleteRequest delReq = new DeleteRequest (); delReq. target = new EntityReference ("account", Guid. parse ("{8b7228cf-fc21-e511-80e1-4253bb2e7cd8}"); DeleteRequest delReq2 = new DeleteRequest (); delReq2.Target = new EntityReference ("account", Guid. newGuid (); req. requests. add (delReq); req. requests. add (delReq2); CrmSvc_Online.Execute (req );

The second message will report an error. The final result is: no records are deleted. Is it cool?

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.