Tuesday, December 28, 2010

CRM 2011 - Webresources and SOAP Endpoint

Like mentioned in my previouse post about the Limitations of the oData Endpoint, there is "currently" no option for assign records or use the Execute-Functionality of the CRM-Service using the oData Endpoint. I found an interesting hint in the new RC-SDK.

You can use JScript and Silverlight Web resources to access Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online data from within the application. There are two web services available, each provides specific strengths. The following table describes the appropriate web service to use depending on the task you need to perform.
Task Web Service
Create, Retrieve, Update and Delete records. REST Endpoint
Associate and Disassociate records REST Endpoint
Assign Records SOAP Endpoint
Retrieve Metadata SOAP Endpoint
Execute Messages SOAP Endpoint
Both of these Web services rely on the authentication provided by the Microsoft Dynamics CRM application. They cannot be used by code that executes outside the context of the application. They are effectively limited to use within Silverlight, JScript libraries, or JScript included in Web Page (HTML) Web resources.
The REST endpoint provides a ‘RESTful’ web service using OData to provide a programming environment that is familiar to many developers. It is the recommended web service to use for tasks that involve creating, retrieving, updating and deleting records. However, in this release of Microsoft Dynamics CRM the capabilities of this Web service are limited to these actions. Future versions of Microsoft Dynamics CRM will enhance the capabilities of the REST endpoint.
The SOAP endpoint provides access to all the messages defined in the Organization service. However, only the types defined within the WSDL will be returned. There is no strong type support. While the SOAP endpoint is also capable of performing create, retrieve, update and delete operations, the REST endpoint provides a better developer experience. In this release of Microsoft Dynamics CRM the SOAP endpoint provides an alternative way to perform operations that the REST endpoint is not yet capable of.
That means, you have to use the SOAP-Endpoint for Assign, SetState... in your Webresource. How this can be handled is not shown in the SDK at the moment. I hope for an update.

UPDATE: Walkthrough: Use the SOAP Endpoint for Web Resources with Silverlight.