Originally published at http://goo.gl/bkewP1

​I can’t really take a lot of credit for this post. All of the difficult work was done by a couple of Dynamics gurus.

XRM Prep Plug-in

This is a plugin for XrmToolBox (http://xrmtoolbox.codeplex.com/) by Tanguy Touzard. Great thanks to Tanguy for releasing XrmToolBox and providing really solid documentation on how to create Plug-ins for it. XrmToolBox and his numerous other very useful Dynamics CRM tools, which all now run in XrmToolBox, are a great value to the Dynamics CRM community.

The idea, implementation logic, and solution file that are the basis for this plug-in are the work of Marc Schweigert from Microsoft. His excellent blogging has been the source of great education for me about how to get the most out of Dynamics CRM. The XRM Starter solution file and the code were published
by him in the blog post linked to below.


You must install XrmToolBox on your machine to use this plug-in (http://xrmtoolbox.codeplex.com/). After installing XrmToolBox copy the Procetrnix.CleanForXRM.Dll file to the same directory that XrmToolBox.Exe is installed. Run XrmToolBox and you should see the XRM Prep listed as one of the modules under the Home tab.

This plug-in is intended to be used against a new Dynamics CRM organization prior to making any customizations to prepare it for custom development, it can perform the following:

  • Install the XRM Starter solution file from Marc’s post.
  • Hide the existing reports.
  • Remove all the non-required security roles.
  • Remove the standard dashboards.

There are four checkboxes that allow you to select what all you want XRM Prep to handle for you. If you do not want the solution file to be imported you should uncheck Import Solution, etc. When you are ready click on Run in the toolbar at the top of the tab to run the process. You’ll see a status screen while the work is being done and a message box will inform you when it is completed.

If you want a copy of the solution file you may download it from the link in Marc’s blog article (URL above) or you can click the Export XRM Solution File from the toolbar to export the file.

The DLL exposes a public class, XrmSolutionSetup, that can be used by any .NET 4.0 code. XrmSolutionSetup has a method called Execute that expects to be used as the delegate for BackgroundWorker.DoWork. Thus, this
code could be reused in another solution if you did not want to use XrmToolBox. One idea would be to implement this in a console application or PowerShell script that deployed and configured a new organization to start development. 

Here is the plug-in DLL: http://sdrv.ms/11pTAIn

If you want to modify it for your own purposes or just see how it was implemented here is the source:http://sdrv.ms/11pTMaB

No guarantees or anything…the source code is there so make it do what you want it to do. I hope this will help you speed up development work and inspire a couple people to make use of the great platform that Tanguy has given us with XrmToolbox.

Categories: Dynamics CRM