Implementing a two-way communication between Microsoft Dynamics CRM and 3rd party app

Posted by CxDoo on Stack Overflow See other posts from Stack Overflow or by CxDoo
Published on 2010-04-27T09:25:16Z Indexed on 2010/04/27 9:33 UTC
Read the original article Hit count: 315

Filed under:
|

I need to implement a bi-directional communication between Microsoft Dynamics CRM and a 3rd party server. The ideal scenario is as follows:

  1. User tries to create an entity in CRM
  2. In pre-create hook a 3rd party library function is called (or web service or whatever), filled with relevant info, which tries to create the respective entity on the server
  3. If the call fails, creation fails in CRM
  4. If the call succeeds, the entity is created in the CRM AND additional fields are filled with return values from the call

More specifically, I want to do something like this when user tries to create a new entity instance:

try {
    ExternalWebService.CreateTrade(ref TradeInfo info)
    //this was initialized on the external server
    myCRM_Trade_Entity.SerialNo = info.SerialNo; 
    CreateNew(myCRM_Trade_Entity);

} catch (whatever) {
    fail;
}

What would be the suggested way to do this? I am new to Dynamics, have read about Workflows and Plugins but am not sure how should I do this properly.

© Stack Overflow or respective owner

Related posts about dynamics-crm

Related posts about extension