locked
Retrieve and update in a single web service call RRS feed

  • Question

  • Hi all,

    I am integrating CRM (2011) and BizTalk (2013) with the CRM OrganizationService WCF service. I am wondering if it's possible to retrieve an entity and update its attributes in a single web service call?

    Thanks.

    Monday, March 31, 2014 1:46 PM

All replies

  • Hi,
    you are asking to read and write in a single call. It's a bit nonsense. They are two separate operations and you need to make two calls.

    It is possible to update the entity without retrieving it first but you need to know the primaryid before.


    My blog: www.crmanswers.net - Rockstar 365 Profile

    • Proposed as answer by Guido PreiteMVP Monday, March 31, 2014 6:36 PM
    • Unproposed as answer by Guo Ming Li Monday, March 31, 2014 6:50 PM
    Monday, March 31, 2014 6:35 PM
  • Thank you very much for your Response Guido. I understand that Read and Write is 2 separate calls using the OrganizationService. But I don't think it's "nonsense" without understanding the requirement to perform this operation. Thanks anyways.
    Monday, March 31, 2014 6:55 PM
  • Thank you very much for your Response Guido. I understand that Read and Write is 2 separate calls using the OrganizationService. But I don't think it's "nonsense" without understanding the requirement to perform this operation. Thanks anyways.

    I didn't want to be rude. Because it's 1 read and after 1 write, these operations doesn't belong neither in one transaction (such as 2 write operations with a rollback mechanism). If your requirement is to update the entity every time you retrieve the entity (for example to store the user who accessed the record and when the record has been retrieved) (note that this is different than says in general way "retrieve an entity and update its attributes in a single web service call") the right way to implement is using a synchronous plugin attached to the retrieve message, and inside the plugin update the entity attributes.

    In this way you perform only a retrieve, but it's the CRM platform that performs the update.


    My blog: www.crmanswers.net - Rockstar 365 Profile

    Monday, March 31, 2014 9:02 PM