Friday, August 26, 2011

Microsoft CRM 2011 and Silverlight 4(Using CRM web resources from silverlight)

Hi, 

I have made small document on using CRM 2011 webresources in silverlight application.

CRM & Silverlight

How do I use MS CRM resources from Silverlight?

The rest endpoint for web resources provides an alternative interface to work with MS CRM 2011.

We can use rest services(URI based) to access resources from CRM and can be only accessible from Silverlight and JavaScript web resources.



MS CRM Rest service Implementation.

MS CRM 2011 uses WCF framework to implement odata protocol (that is rest based data service)

This end point is called as Organization Data Service.

In MS CRM, the root service URL will be “[Your Organization Root URL]/xrmservices/2011/organizationdata.svc“.



Odata service sends or receives ATOM or JSON formats. ATOM is a xml based format and JSON is text format.

OData Entity Model (EDM)



The Microsoft CRM EDM is described in a OData service metadata document available at

“[Your Organization Root URL]/xrmservices/2011/organizationdata.svc/$metadata“.

This will use conceptual schema definition language (CSDL) to describe data available in it.



Limitations:



1. Only CRUD operation can be done. But messages that require Execute method cannot be performed.


2. Authentication can be done within the application. Use of rest end point are only limited to JavaScript and Silverlight web resources.


3. You cannot use late binding with managed code with Silverlight. You will typically use WCF Data Services Client Data Service classes while programming by using managed code for the REST endpoint with Silverlight. These classes allow for early binding so that you get strongly typed classes at design time. The only entities available to you are those defined in the system when the classes were generated. This means that you cannot use late binding to work with custom entities that were not included in the WCF Data Services Client Data Service classes when they were generated.




No comments:

Post a Comment