In previous articles I’ve discussed the 365 SDK, creating a connection to the server via the IOrganizationService, and usage of the entity class. Once you have those key elements, it’s really easy to perform create, retrieve, update, and delete (CRUD) operations. I would suggest reviewing those articles before proceeding with this one if you haven’t already. I’m using late bound (and not early bound) here, check out the previous articles for my reasoning and an extended discussion of the merits of either approach.
In this article I’ll address usage of the entity class. The entity class is critical element when interacting with 365 data via the IOrganizationService, it is especially important when working in a late bound fashion. You will pass entity objects to and from 365 to create, retrieve, and update data.
If you are .Net developer and you need to connect to 365 from an external application, e.g. console application, then your easiest option is to the use the SDK. In this article, I’ll describe the basic steps to setup a project and connect to 365 use the Xrm Tooling assembly. In follow up articles I’ll go into more detail about using the connection to do something useful. If you are writing a plugin or custom workflow you will create your connection in a different manner, search the MSDN for more details.
Microsoft provide a downloadable SDK that contains a variety of resources which are often useful (or required) when working with 365. You can get the SDK here (or just Google it if the link drops). When you start the download process you may be offered two files.
- MicrosoftDynamics365SDK – this is the SDK and the file you want, it will extract the SDK contents into a directory of your choice.
- MicrosoftDynamicsCRM2016UII – you probably don’t want this, it’s the Unified Service Desk and the UII framework which provides a “framework for building integrated agent applications that provide unified access to customer information across different systems”.
Dynamics 365 has several web services, these provide access to pretty much every piece of data and functionality within the application. Whilst some web services have distinct duties, there are a couple dedicated to working the application data which have overlapping functionalities. This is due to the evolution of the product; web services are added and deprecated over time. I’ll be looking at the web services currently available in 365, you may come across the ‘2007 endpoint’ however this was deprecated with CRM 2011.
- Function correctly.
- Microsoft support will help when they don’t.
- Will continue working when an upgrade occurs (unless features are deprecated – this happens but you usually get several years’ notice).
Server sided developments in Dynamics 365 allow us to interact with the application data and processes. Primarily we can add coded elements directly into the application itself, or communicate with 365 from our own external applications.