Creating OrganizationData (ODATA) Service Reference in Dynamics CRM 2011 – The REST Endpoint

Creating OrganizationData (ODATA) Service Reference in Dynamics CRM 2011 – The REST Endpoint

It was while working on one of my first projects in Dynamics CRM 2011 that I encountered the following error when creating the Service Reference to the REST endpoint in Dynamics CRM 2011.


The custom tool ‘DataServiceClientGenerator’ failed. Data service client code-generation failed: Schema specified is not valid. Errors: (0,0) : error 0042: Name nje_fail cannot be used in type Microsoft.Crm.Sdk.Data.Services.nje_fail. Member names cannot be the same as their enclosing type..

This error appears to be a result of naming a field name the same name as its containing table’s name. In my next few entries, I will discuss a few ways to circumvent this issue. One of which still enables you to use Early Binding.