mohamed khairy
mohamed khairy

Reputation: 27

Retrieving events from Dynamic CRM 2011

  1. I want to retrieve the events from dynamic CRM 2011 with begin/end date.

  2. I want to build WCF using C# to consume the CRM OData to return all events.

I'm doing this because I want to get the events in one of the ios applications we are developing .

So how can I consume the CRM OData to retrieve all the events and convert them to json?

Upvotes: 1

Views: 79

Answers (1)

Jordi
Jordi

Reputation: 1470

So the plan is then then to consume the data in the following order: CRM -> Your WCF -> iOS?

If you are putting a WCF in the middle then best to use the IOrganizatioService endpoint rather than OData, because you could return whatever Json you need from the WCF endpoint even if the request to CRM is using SOAP (IOrganizationService).

This is because the OData endpoint is more limited than the SOAP one, you can do more things with IOrganizationService than OData.

Here is an article which might help you to get started.

Note: it would be better to have CRM -> Web API -> iOS. Just saying it because although you can return JSON from a WCF service, it's kinda a pain in the ass to setup, whereas with Web API, it is straightforward and automatically negotiated with the client based on the Content-Type header (which could be JSON / XML / etc...)

Upvotes: 1

Related Questions