Tag: what is discovery service in dynamics crm

When To Use Which Microsoft Dynamics CRM Web Service

thiking kid

Meet Jerry, he is wondering about dynamics crm services, In this blog I am helping him to understand when he should use which dynamics CRM web service.

Let’s first understand how many services dynamics crm offers post which will discuss which service to be used when:

  1. Web API
  2. Organization Service
  3. Organization Data Service
  4. Discovery Service
  5. Deployment Service

Web API

WebAPI is fairly new for dynamics CRM and i see many developers havent touched upon it. You should be using WebAPI Service while doing Client side development(preferably) such as Javascript, HTML etc. At this point its not easy to use WebAPI on server side but i am sure it will be possible in coming updates. Web API uses ODATA (Open data protocol). It also doesnt need any dynamics CRM related libraries or assemblies. You perform CRUD operation using XmlHttpRequests.  

Organization service

Organization service is basically a SOAP endpoint of dynamics crm and have been available since dynamics crm version 2011.  This Service has to be used with .Net Framework and for Business logic that runs in plug-ins or workflow assemblies on the server expect to use the Organization service.( So nothing client side). To work with Organization you have to use microsoft dynamics crm SDK i,e provided libabries and assemblies to interact with dynamics crm.

Organization Data service

It is also known as Odata service for dynamics crm which is Infact nothing but a “REST” Endpoint. You can utilise Odata endpoint in C# code( a server side code as well) but it is widely used for for client side scripting using javascript. However this has been deprecated with the release of dynamics crm 365 which means it is no longer supported. and completely replace with WebAPI.

 

Discovery web services

As the name suggest, this service should be used when you have mutiple CRM instances of dynamics crm in single deployment. You would use this service in your plugins ( the server side code) to get the current instance obtain the context.

 

Deployment web service

This service is barely used by developer as UI options are available. Such as Deployment manager etc. Use this service if you have create , delete or edit a dynamics crm organization/instance. Again its all server side.

 

I hope this clears your doubt as to when you would use which service and with what programming language.

Cheers!