Using CRM web service in client-side code
Here, we can use client-side code to access the Dynamics 365 database, to perform CRUD operations with Dynamics 365 data at client side we use ODATA and SOAP services of Microsoft Dynamics CRM. We use XMLHttpRequest to send request to these services to get the response.
Organization data services
Key points about Organization Data service:
• It is preferred service for client-side development.
• Organization Data service is also known as “OData” or “REST” endpoint.
• Microsoft Dynamics CRM uses Windows Communication Foundation (WCF) to provide REST-based service.
• It supports JSON and ATOM format.
• Organization Data service can be used within Web resources, form scripts and ribbon commands.
• Authentication is provided by the application itself, no need to write authentication code.
• It implements OData v2 standard.
• It is deprecated with Dynamics 365, Web API should be used to support Dynamics 365 and future versions.
• It can return maximum 50 records in a single retrieve operation.
• It is much faster as compared to Organization service, because less bytes in JSON message in comparison to SOAP message.
We can also use modern Simple Object Access Protocol (SOAP) endpoints to access data. The modern app SOAP endpoint provides access to all the messages defined in the Organization service. SOAP is an XML-based protocol and it uses XML request and response for communication. While the modern app SOAP endpoint is also capable of performing create, retrieve, update and delete operations.