Two ways we can use consume CrmService within a Silverlight Application are as follows.
-
Add Service Reference to CrmService in the Silverlight Project and work with CrmServiceSoapClient class.
The things we need to consider here are
We need to explicitly pass the Header information otherwise our CrmService won’t work.
We need to make use of Dynamic Entity in case of Retrieve request as we might not receive values for certain fields.
-
The other easier option is to add a web service to the SilverlightApplication.Web application, which in turn will consume the CrmService.
In our Silverlight Application we will Add Service Reference to this custom web service (acting as a wrapper) instead of CrmService directly.
Download the solution here
http://www.box.net/shared/3p5kkf7di2
MainPage.xaml àInteracts with CrmService directly.
Page1.xamlàUses custom web service to interact with CrmService.
Hope it helps.
Discover more from Nishant Rana's Weblog
Subscribe to get the latest posts sent to your email.
