.NET, Development, Dynamics CRM, Software, Technology

Development using the Microsoft CRM 4.0 SDK (4.0.12)

For an integration project involving implementation of a service-oriented abstraction layer for our Dynamics CRM (4.0), we have been using the new Microsoft CRM 4.0 Software Development Kit (version 4.0.12). The SDK provides powerful features that can be utilized for almost any development aspect related to Dynamics CRM.

The most exciting part of the SDK is the inclusion of the Advanced Developer Extensions that is being called Microsoft xRM. It uses ADO.NET and simplifies a lot of complex tasks. You will get a development experience similar to the ADO.NET Entity Framework with Microsoft xRM. There’s good documentation that comes with the SDK, and one can get started quickly.

The few things that we found really useful –

  1. Connection management to CRM is greatly simplified. You can connect using a single line of code. The information required is stored in the <connectionStrings> section of your app.config or web.config file. To initiate a connection to a CRM instance, you just need to pass the name of the corresponding connection string as a parameter for the constructor of the CRMDataContext class. The DataContext class (derived from CRMDataContext) provides for all connection management to the CRM instance.
  2. There is a packaged command-line utility called crmsvcutil.exe that can generate strongly typed classes for the CRM entities. It even generates classes for all custom entities and attributes. This is great, since it allows the Microsoft xRM to work in ORM fashion.
  3. Using LINQ to query CRM is now possible, and that opens up interesting possibilities. The query results can be used for data binding on ASP.NET pages. Also, there are inbuilt DataSource controls that can make the querying task trivial.
  4. It is possible to combine static entities (one generated using crmsvcutil.exe) and dynamic ones (without generated code) in the same operation. So, you have the flexibility to fine-tune your code whenever required.

The SDK can be downloaded from here.

Leave a comment