Dynamics CRM 2015 – How to start with SDK

 

We’ve seen that in the past there were a lot of threads raised asking how to start using the CRM SDK, what resources to use and what tools are needed.

This blog article has the goal to cover following areas, with Microsoft Dynamics CRM 2015:

1. What is the Microsoft Dynamics CRM SDK?

2. What resources and tools could be used, in order to extend the functionality of your Microsoft Dynamics CRM.

What is the Microsoft Dynamics SDK?

The extensibility platform is the heart of Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online. When you use the Microsoft Dynamics CRM SDK, you are building on top of this system.

When you develop an application that uses the Microsoft Dynamics CRM server, you use Web services to communicate with the underlying xRM platform layer. Microsoft Dynamics CRM uses a metadata driven architecture to provide the flexibility to create custom entities and additional system entity attributes and also to make upgrades and enable transportation of solutions easier. This allows for changes in the data structure without requiring any change to code in Microsoft Dynamics CRM.

The SDK contains an architectural overview of Microsoft Dynamics CRM, the entity model, security model, web services, and sample code.

What resources could be used, in order to extend the functionality of your Microsoft Dynamics CRM.

In order to be able to start developing Microsoft Dynamics CRM extensions we need to have on the machine where we want to install following software development tools:

a. Visual Studio - https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx

b. The .NET Framework

i. .NET Framework 4.5.2 : https://www.microsoft.com/en-us/download/details.aspx?id=42643

ii. .NET Framework 4.6 : https://www.microsoft.com/en-us/download/details.aspx?id=48130

Developer Tools: https://msdn.microsoft.com/en-us/library/hh547431.aspx#

 

After setting up the development machine, we then can download the code samples, tools, and other supporting files that are located in the download package, from here:

· CRM 2015 : https://www.microsoft.com/en-us/download/details.aspx?id=44567

For the older versions you can find them:

· CRM 2011: https://www.microsoft.com/en-us/download/details.aspx?id=24004

· CRM 2013 : https://www.microsoft.com/en-us/download/details.aspx?id=40321

 

Once downloaded, within the software development kit we can find

In the root folder:

CrmSdk2015.chm – the help file contains ins a wealth of resources, including code samples, which are designed to help you build powerful vertical applications using the Microsoft Dynamics CRM platform. It is a guide for developers writing solutions, server-side code, client applications and extensions, custom business logic, plug-ins, integration modules, custom workflow modules and more. You can find the same

EntityMetadata.xlsx - is a Microsoft Office Excel spreadsheet which contains the definitions for the default entities, attributes, and the relationships between the entities. Additional information can be found at https://msdn.microsoft.com/en-us/library/gg309396.aspx

Message-entity support for plug-ins.xlsx - Contains the listing of plug-in support per entity and message. Additional Information can be found here: https://msdn.microsoft.com/en-us/library/gg328576.aspx

The bin folder - Contains the assemblies needed for development by using Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online. Here we can also find following tools:

o CrmSvcUtil.exe - is a command-line code generation tool for use with Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update. This tool generates early-bound .NET Framework classes that represent the entity data model used by Microsoft Dynamics CRM. Additional Information: https://msdn.microsoft.com/en-us/library/gg327844.aspx

o LoginControlTester.exe – A tool used to test the log-in to your CRM Organization

o is a tool that can reversibly decompose a Microsoft Dynamics CRM compressed solution file into multiple XML files and other files so that these files can be easily managed by a source control system. The following sections show you how to run the tool and how to use the tool with managed and unmanaged solutions: https://msdn.microsoft.com/en-us/library/jj602987.aspx

o Websitecopy.exe - The Website Copy tool (Websitecopy.exe), which is provided with the Microsoft Dynamics CRM SDK, creates an exact copy of an existing Microsoft Dynamics CRM website, including all webpages, files, site markers, page templates, settings, and so on. Note that you must first import the base portal CRM customizations into the destination CRM system before you run this application

 

The Resources folder - Contains development resources, such as images, data import maps, and other templates. Within this folder we can find following folders:

o DataImportMaps – contains maps which can be used with the Microsoft Dynamics CRM Data Import Wizard to import data in your CRM organization

o ExportedRibbonXml – here we can find the ribbon definitions for the out of the box CRM Entities

o Images – here we can find the images used in the Microsoft Dynamics CRM Website.

 

SampleCode - Contains sample code to demonstrate how to develop by using Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online. Within this folder we can find sample code for following programming languages:

o C# - \SDK\SampleCode\CS

o VisualBasic - \SDK\SampleCode\VB

o Jscript - \SDK\SampleCode\JS

o PowerShell - \SDK\SampleCode\PS

·

Schemas - Contains the schemas used for validation by using Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online.

Solutions - Contains sample solutions for use with Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online.

Templates – here we can find the CRMSDKTemplates.vsix – A package which can be installed on top of Visual Studio, in order to create CRM Project templates

Tools - Contains the tools needed to register plug-ins and workflows, and to create strongly typed classes. Here we can find:

o ConfigurationMigration - The Configuration Migration tool enables you to move configuration data across Microsoft Dynamics CRM instances and organizations. Configuration data is used to define custom functionality in CRM, and is typically stored in custom entities. Additional Info: https://technet.microsoft.com/en-us/library/dn647421.aspx

o DeviceRegistration – is used when you want to manually register the device from where you want to run the CrmSvcUtil.exe tool

o MetadataBrowser - You can use the Entity Metadata Browser to view entities and their properties in Microsoft Dynamics CRM. The Entity Metadata Browser is a managed solution available in the downloadable files. Additional Information: https://msdn.microsoft.com/en-us/library/hh547411.aspx

o PackageDeployer - is a new tool that enables administrators to deploy packages on Microsoft Dynamics CRM Online and Microsoft Dynamics CRM (on-premises) instances. A “package” can consist of any or all of the following:

 

  • One or more CRM solution files.
  • Flat files or exported data files from the Configuration Migration tool. For more information about the tool, see TechNet: Manage your configuration data.
  • Custom code that can run while the package is being deployed to the CRM server, or after it’s been deployed.
  • HTML content specific to the package that can display at the beginning and end of the deployment process. This can be useful to provide a description of the solutions and files that are deployed in the package. Additional information: https://msdn.microsoft.com/en-us/library/dn688182.aspx

o PluginRegistration : Provides a graphical user interface and supports registering plug-ins and custom workflow activities with Microsoft Dynamics CRM. However, plug-ins and custom workflow activities can only be registered in the sandbox (isolation mode) of Microsoft Dynamics CRM Online. Additional information: https://msdn.microsoft.com/en-us/library/gg309620.aspx#bkmk_pluginregistration. Within the PluginRegistration folder we can also find:

 

  • PluginProfiler.Solution - The Plug-in Profiler is a tool that profiles the execution of plug-ins and custom workflow activities for an enhanced debugging experience in Microsoft Visual Studio. This tool, which can be run from the Command Prompt window or from within the Plug-in Registration tool, makes developing custom code against Microsoft Dynamics CRM 2015 and Microsoft Dynamics CRM Online 2015 Update quicker and easier. In addition, users can profile the execution of failing code and send the results to the developer of the code or independent software vendor (ISV) for analysis. The developer can replay the plug-in or custom workflow activity execution and debug the code remotely even when disconnected from the Microsoft Dynamics CRM server. Additional information on how to use this tool: https://msdn.microsoft.com/en-us/library/hh372952.aspx

o WebResourceUtility - The Web Resource Utility is a WPF application project that you can compile and run to import many Web Resource eligible files from a folder structure with a consistent naming convention based on the folder structure. Additional Information https://msdn.microsoft.com/en-us/library/gg328133.aspx

Walkthroughs folder - Contains the completed solutions that correspond to walkthroughs presented in the SDK documentation.

 

Once familiarized with the tools, we can start using the SampleCodes to learn to develop extensions for the Microsoft Dynamics CRM. Here following resources might come in handy:

 

Also, depending on the type of project you want to build, you can find additional information under:

 

Best Regards

EMEA Dynamics CRM Support Team

Share this Blog Article on Twitter

Tweet

Follow Us on Twitter

Follow @MSDynCRMSupport