locked
Accessing External webservice from Microsoft Dynamics CRM RRS feed

  • Question

  • Hi All,

    I would like to access External web-services from Plug-in, which i would like launch using Java script, is it possible?

    Thanks and Regards

    Ravi

    Wednesday, August 3, 2011 1:21 PM

Answers

  • It's possible to access an external web service from both plugin code and javascript, however, plugins fire on the server while javascript runs client side. The only way to launch a plugin from Javascript is to call the CRM web service from the script, and do some sort of operation on a record  which fires the plugin, but that approach is just queer.

    What do you need to accomplish? If you're more specific, it's easier to tell you the right approach

    • Proposed as answer by Torstein Utne Wednesday, August 3, 2011 1:40 PM
    • Marked as answer by E Ravi kumar Wednesday, August 3, 2011 2:05 PM
    Wednesday, August 3, 2011 1:40 PM
  • Yo don't need javascript at all. Plugin is registered on server-side messages in CRM. Those messages are CRUD-operations and some more. If you register your plugin correctly, your plugin will execute a record changes state or values in CRM, depending on which message you register it for.

    However, be aware that there's no such thing as atomic transactions in CRM. If your plugin  or billing server for some reasons fails, you will face problems with having different sets of data on each system. If that's a critical issue, you should take a loosely coupled approach between the two systems.

    • Marked as answer by E Ravi kumar Thursday, August 4, 2011 3:06 AM
    Wednesday, August 3, 2011 3:54 PM

All replies

  • It's possible to access an external web service from both plugin code and javascript, however, plugins fire on the server while javascript runs client side. The only way to launch a plugin from Javascript is to call the CRM web service from the script, and do some sort of operation on a record  which fires the plugin, but that approach is just queer.

    What do you need to accomplish? If you're more specific, it's easier to tell you the right approach

    • Proposed as answer by Torstein Utne Wednesday, August 3, 2011 1:40 PM
    • Marked as answer by E Ravi kumar Wednesday, August 3, 2011 2:05 PM
    Wednesday, August 3, 2011 1:40 PM
  • Hi Torstein,

    My requirement is like this, I have to access and update billing server and one more server repeatedly on various events in Microsft CRM, So I would like to write a generic code in Plug-in and launch that on various events through Javascript.

    is it possible is my query? and even some solution which is near to it i am ok with it.

    Thanks and Regards

    Ravi

     

     

    Wednesday, August 3, 2011 2:11 PM
  • Yo don't need javascript at all. Plugin is registered on server-side messages in CRM. Those messages are CRUD-operations and some more. If you register your plugin correctly, your plugin will execute a record changes state or values in CRM, depending on which message you register it for.

    However, be aware that there's no such thing as atomic transactions in CRM. If your plugin  or billing server for some reasons fails, you will face problems with having different sets of data on each system. If that's a critical issue, you should take a loosely coupled approach between the two systems.

    • Marked as answer by E Ravi kumar Thursday, August 4, 2011 3:06 AM
    Wednesday, August 3, 2011 3:54 PM
  • Hi Torstein

    Thanks for the reply, sorry for delay in responding

    Regards

    Ravi

     

     

    Friday, August 5, 2011 8:39 AM