Background

In addition to an application that may be useful to your organization out of the box, Microsoft's Dynamics CRM (CRM) is an application development environment. The environment has several components that you would not find an standard application that is not designed for configuration, customization or extensibility including:

  • A metadata driven environment for both data, user interface and logic.

  • Extensions points to extend existing components through code based solutions.

  • Support for multiple devices such as desktop/web, Outlook, mobile devices/web and mobile devices/native.

  • Themeability.

Advanced customizations require development of artifacts outside the CRM application environment. For example, you often need to use Visual Studio (an integrated development environment-IDE) or other programming tools such as editors, compilers, and build systems. Because CRM is a metadata driven application, one of the largest challenges to creating advanced customizations is ensuring that the required metadata is created correctly. One of the primary reasons that Visual Studio is so popular for developing programming solutions for CRM is that it has templates that manage the process of creating and updating the metadata as you develop.

If you choose development tools other than Visual Studio, recognize that you may need to use Visual Studios at some point or, at least, replace the process of creating the metadata describing your customization prior to deployment.

Deploying Advanced Customizations - Solutions

CRM has a few approaches to deploy the customizations you create. Actually, there are really only two and not all are available for every type of advance customization:

  • Use CRM's provided advanced customization tools. For example, you can create a Web Resource and provide the javascript code directly in CRM. However, the edit-debug-test cycle is painful because the tool provided, say for code development, is a simple editor with no highlighting, debugging or formatting support.

  • Use Solutions. Solutions are bundled packages of artifacts that include binary DLLs, individual web resources such as images, javascript and html files. Solutions also contain the metadata that describes the Solution and the contents of the solution "zip" file.

Clearly, while you could use the first approach for some initial development, at some point you must deploy using Solutions as its the only viable deployment model that makes it easy for your consumers (and you) to use the solution you create.

A solution is imported into an "org unit." An org unit is a deployment of CRM and is represented conceptually as an unique URL that you use to access the CRM application. If you want to use a single solution across multiple org units, you must import it manually into each one.

The screenshot below shows the "Solutions" page inside of CRM from a demo environment. It shows the that the CRMRestBuilder solution has been imported into the org unit.

Supporting Tools

The CRM community has created supporting tools that help you manage your CRM application easier. Check out XrmToolBox. Toolbox plugins help you do things more easily such as deploy Web Resources or migrate solutions from one environment to another. A screenshot from their main website is show below:

The Web Resource management tool allows you to easily view all Web Resources from a solution and understand how they are put together. Its an invaluable resource to see how experts create their solutions. The XrmToolBox picture below shows the expanded view for John Lattimer's CRMRestBuilder.

It is obvious from the picture above that a Web Resource solution has many files associated with it and that when you develop an advanced customization solution designed to be used by many people in any different environments, that its a sizable effort as you would expect. Creating a solution for just your use is easier, but you should recognize that there is a large number of supporting tools you will need to master. Since web application development has always been evolving rapidly, the range of tools and practices is quite large and can be complex at times.

Other supporting tools are not surprising given the web nature of CRM. Your browser debugger can provide a wealth of information. Just hit F12 or turn on your debugging tools to watch the load approach, the HTML structure and the javascript being used to create the web UI and interface with the data services. I will not provide any browser screenshots in this section, but turning on your browser debugging is instrumental in learning about how to customize, some but not all, of the CRM application.

Beg, Borrow and Steal

I do not mean literally steal, but when it comes to advanced CRM customizations, you will need to lean heavily on prior work, MSDN documentation and reading the source code of what is available. Much of the source code for the web UI is available via tools such as XrmToolBox or by just looking at the .aspx pages in an on-premise install in the IIS directory. Not all source code can be viewed this way. In reality, it will not be overly useful in the long run as the CRM application uses many of the same interfaces that you are provided to you to use. It is instructive of course to look at sources and see how other people programmed their customizations.

Borrow heavily.

Last updated