Search code examples
javascriptweb-servicestitaniumdynamics-crm-2011dynamics-crm-online

Javascript - Add and retrieve data from MS Dynamics CRM Online


I want to add/retrieve data from MS Dynamics CRM Online 2011 using pure Javascript. I've searched whole day but could only find to do this with Dynamics SDK, C#, VB or JScript.

Is there any way to do this in pure javascript? I just need to find a web service to send/ get data to/from but couldn't find it. Is there any such web service or api exists??? Please help I am totally confused!!! Thanks.


Solution

  • The two ways to interact with Javascript and CRM is via either OData, or SOAP services. The easiest method is to use OData if possible.

    The problem you're going to run into is Authentication with Odata. OData Access is not supported outside of CRM javascript and Silverlight. (Although I use LinqPad to create my Odata queries, and it queries CRM with it just fine, so I'm not sure what that's all about)

    The common method for getting around this is writing your own Webservice that authenticates to CRM, and then uses the SDK to retrieve and update the data, exposing it to you in a restful manner.

    As Guido points out, you should be able to use SOAP requests from Java, but I've only ever done this from within CRM as well, and I'm not sure what authentication issues you will face as well.