Stunnware Tools

The Stunnware Tools for Microsoft Dynamics CRM 4.0 combines a set of tools created for CRM developers and consultants. Initially being divided into multiple standalone applications, the tools framework serves as a single container for all of them, allowing for interaction between components which wasn’t possible before.

The application has two different flavors:

  • The Community Edition: It’s free and contains the Metadata Viewer, FetchXml Wizard and Excel Export.
  • The Professional Edition: A subscription-based version with access to all tools of the Community Edition plus the Code Generator for C# and VB.NET, the CRM Help File Generator, additional features of the FetchXml wizard and the Customization Comparer.

The download includes a help file with detailed information on all modules. The same help file is available as a separate download, allowing you to get familiar with the features before installing the application. Please refer to this help file for more information; the following is just a small overview of the product features.

The download includes a help file with detailed information on all modules. The same help file is available as a separate download, allowing you to get familiar with the features before installing the application.

The Stunnware Tools for Microsoft Dynamics CRM 4.0 Framework serves as a container for extension modules, so-called plug-ins, that perform specific tasks. The Framework itself manages these extensions and allows interaction between them. The only notable functionality besides extension management is the logon to a CRM 4.0 organization and the software activation process, which is required to turn the Community Edition into a Professional Edition.

The general purpose of the Metadata Viewer is to get a quick overview of entities, attributes, relationships and everything else contained in the CRM Metadata. CRM does provide a graphical representation of the metadata: type in http://crmserver:port/organization/sdk/list.aspx in Internet Explorer, replacing crmserver, port and organization with the respective values, and you get an entity list and information about attributes and relationships as well. However, when extensively working with information from the CRM Metadata, you may find the Metadata Viewer easier to use.

The Excel Export is a small utility allowing to export data being displayed in views into the Excel 2003 XML format. It is a free extension and doesn’t require a subscription.

The FetchXml Wizard is a graphical query editor based on the FetchXml query language. Like a designer in Visual Studio, you can create a query either in a designer window or in a code window. You can also execute queries, look at the result XML and create .NET code based on your query. Since version 4.4.24 you also get an intellisense-style context sensitive help for the FetchXml source and the generated C# and VB.NET code.

The Professional Edition contains additional features that are not available in the Community Edition: Compile and execute the generated .NET code, investigate the sent and received SOAP messages and create JavaScript code for use in CRM forms.

A big disadvantage when working with the Microsoft CRM SDK assemblies, is that you have to use dynamic entities most of the time. While the DynamicEntity class was enhanced in CRM 4.0 to make it easier to use, you’re losing a lot of benefits you had when using the web services:

  • Type and property checking: You don’t know at compile time if your code is correct, because you are not using strongly typed classes and you don’t access named properties.
  • Intellisense: because of the above, you also don’t get any context-sensitive help while developing in Visual Studio
  • You have to use the more complex RetrieveRequest and RetrieveMultipleRequest messages with the Execute method instead of the Retrieve and RetrieveMultiple methods.

All in all your code becomes more complex and it takes more time to develop and test. The Code Generator module gives you back everything you lost plus some additional benefits:

  • Works with the CrmService class and the ICrmService interface from the Microsoft CRM SDK assemblies
  • Creates C# and VB.NET code
  • Creates classes for all or selected entities, providing nullable properties for easy access
  • All attribute names in each class are defined as constant strings, so you never have to look at CRM again to remember the correct spelling
  • Creates enumerations for all picklists, state and status attributes
  • Adds methods for easy use of the CRUD operations (Create, Retrieve, RetrieveMultiple, Update, Delete)
  • Adds methods to change an entity’s state
  • Provides easy management of all reference types (Lookup, Owner, Customer), e.g. you write account.Primarycontactid = myContact.ToReference()
  • Adds comments to classes, properties and methods, which are available in Visual Studio through Intellisense.
  • Allows you to create your own code generation templates. If you want some special methods in every class, then simply add it to the template files.

The Code Generator is limited to the account and contact entities when running the community edition.

The Documentation module is meant as a tool to create technical documentations of a CRM organization. It uses the Microsoft HTML Help Compiler to create a compiled HTML file (chm extension) that you can deliver to customers or use it for your own reference.

Though there is a complex example shipped with the product, you are totally free in defining the content and look and feel. In summary, the CRM documentation extension allows:

  • Selecting the entities to document. This can be all entities or a subset only.
  • Defining the structure of the Table of Contents.
  • Using templates to create documentation for entities and attributes.
  • Merging information from the CRM Metadata and customizations.
  • Documenting script source, including all OnLoad, OnSave and OnChange events, plus CRM scripts used by CRM internally.
  • Builds a help index automatically.
  • Optionally compiles the HTML source files and views the final help file.

You need the Microsoft HTML Help Compiler on your system to compile the source files. It is included in the HTML Help Workshop, which you can download at http://www.microsoft.com/en-us/download/details.aspx?id=21138

The Help File Generator is limited to the account and contact entities when running the community edition.

If you have to troubleshoot a CRM installation, it’s very important to know if the system has changed and what changes have been made since the last time you deployed your solution. Many problems are based on customization changes, but finding the differences between the current and a previous system state is very difficult and time-consuming.

The Customization Comparer takes two CRM customization export files (customization.xml) and compares their contents. All modifications are shown in a result tree, giving a quick view of what has changed. All you have to do is exporting all customizations and save the file for later reference. You can then, at any time, do an export again and compare these files. You can also export a subset of customizations instead.

Sometimes weird things happen in Microsoft CRM and the error messages provided are not always helpful. The good news is that CRM provides a powerful logging mechanism, called CRM tracing. To enable tracing, please refer to the appropriate Microsoft KB Article.

The bad thing about these trace files are that they are hard to read and analyze. If you don’t know what exactly to look for, then it can be a very time-consuming process. The Trace File Viewer allows easy parsing of such files and offers a variety of filtering options.

The ISV.Config editor and the Sitemap editor allow you to easily load the customizations from CRM, edit the XML in an XML editor, validate and save it back to CRM. Since version 4.4.24 you also get an intellisense-style context sensitive help when editing the XML.

DownloadSizeDateVersion
ZIP File 18,954 KB2011-08-124.5.32
Documentation4,439 KB2009-10-02
End User License Agreement70 KB2012-10-02

There is no setup included in this version. Simply extract the zip file to your hard drive and run SwTools.exe. This version uses the same subscription mechanism as before, so your subscription key does work as well.

Note: This version requires the Microsoft .NET Framework 3.5 to be installed on your system.

Important:

When upgrading from version 4.5.28 or any older version and you have the Professional Edition and you are running on a 64-bit machine, then the licensing information is not found after the upgrade and the Stunnware Tools starts in Community Mode. To prevent this from happening, please deactivate the license before upgrading and activate afterwards. If you already have upgraded, then follow these steps to enable the features of the Professional Edition:

  1. Open the registry and navigate to HKLM\Software\SwTools. You will see a value named License. Double click the value and copy the XML string into the clipboard.
  2. Navigate to HKLM\Software\Wow6432Node and create a sub key named SwTools. Then add a string value to this key named License. Double-click the new License value and paste the content of your clipboard.

These steps copy the license information from HKLM\Software\SwTools to HKLM\Software\Wow6432Node\SwTools. Restart the Stunnware Tools and you are back in the Professional Edition.

ModuleTopicreported on Affected version Fix onFixed in Version
FetchXml WizardWhen adding a link-entity from an intersect entity, the from attribute was set incorrectly.2010-02-184.x2010-03-084.5.31
LicensingSupport for CRM Online required the application to be compiled targeting x86 CPUs rather than all CPUs. 32-bit applications on 64-bit machines accessing data in the HKLM\Software tree of the registry are redirected to HKLM\Software\Wow6432Node. The licensing information of the Stunnware Tools is stored in HKLM\Software\SwTools and no longer found after upgrading to 4.5.29. As a result you are running the Community Edition.

If you are running a 64-bit machine and are using the Professional Edition, then follow these steps to get the features of the Professional Edition enabled:

Open the registry and navigate to HKLM\Software\SwTools. You will see a value named License. Double click the value and copy the XML string into the clipboard.
Navigate to HKLM\Software\Wow6432Node and create a sub key named SwTools. Then add a string value to this key named License. Double-click the new License value and paste the content of your clipboard.

These steps copy the license information from HKLM\Software\SwTools to HKLM\Software\Wow6432Node\SwTools. Restart the Stunnware Tools and you are back in the Professional Edition.
4.5.29
FrameworkSupport for CRM Online was added.2009-10-014.x2009-10-024.5.29
CRM DocumentationSupport for options in picklist, state, status and boolean fields was added and the If command is now available in articles as well. It was limited to the table of contents before.2009-07-314.x2009-09-304.5.29
Code GeneratorAttributes of type EntityNameReference, like the objecttypecode field in an annotation, are created as picklist properties. It should be an EntityNameReferenceProperty instead.2009-09-014.x2009-09-294.5.28
FetchXml WizardThe "QueryExpression (CRM SDK)" tab was visible in the Community Edition. It is a feature of the Professional Edition though and therefore didn't show any code, which is correct. However, the tab page shouldn't be visible at all in the Community Edition. 2009-07-214.x2009-09-294.5.28
FetchXml WizardAn "Object reference not set to an object" exception is thrown when clicking the "Start Fetch Xml Query" context menu item, which is displayed in several locations if the FetchXml Wizard is enabled.2009-09-284.5.272009-09-294.5.28
MetadataA new button, "Clear Metadata Cache" is available in the Metadata group. For performance reasons the internal metadata cache checks for updated metadata every 10 minutes. The Clear Cache button instantly clears the cache and forces a reload of the metadata when accessed the next time. This may not affect open windows though. For instance, the entity list in the metadata viewer is not updated. However, when opening a new metadata viewer view you will see the changes.2009-09-104.x2009-09-174.5.28
AllGrid Views now operate in cell-select mode. You can select as much cells as you want and hit CTRL-C to copy the selected values to the clipboard.2009-07-214.x2009-08-264.5.28
FrameworkYou can now check for newer releases directly from the application. You can do so manually or whenever you start the application.2009-08-254.5.27
Metadata ViewerThe Metadata Viewer UI was completely redesigned. It now uses data grids everywhere allowing you to sort, categorize and filter data without limits. You can also export any data to Excel and Word (Word only in the Professional Edition).2009-08-254.5.27
FrameworkThe state of the loaded plug-ins was lost when upgrading to a new version if the version number of the plug-in changed.4.x2009-08-254.5.27
Activation/VersionThe Activation is now available from the Jewel (the Stunnware Circle in the top left corner of the main application window). The dialog box now also contains the version number.2009-08-234.5.27
Metadata ViewerIn the Professional Edition you can now display previously saved metadata. The metadata is saved to disk whenever you disconnect or close the application. This saved metadata can now be viewed without having to connect to an organization, allowing you to analyze data without having access to the CRM Server.2009-07-214.x2009-08-234.5.27
Export to WordThe Export to Word function was added to the professional version. You can now export all or selected items in any grid view to a Word document (Word 2003 or higher). The "Export to Excel" plugin now becomes the "Export to Office" plugin.4.x2009-08-234.5.27
Export to ExcelThe Export to Excel plug-in now also works on grids and can export the entire view or selected items only.4.x2009-08-234.5.27
Logon DialogYou can now rename and delete profiles.4.x2009-08-214.5.27
FetchXml WizardThe Fetch.xsd schema was updated. The previous version from the CRM SDK was wrong and as a result the editor showed syntax errors.4.x2009-08-214.5.27
AllAccessing the metadata may slow down the application significantly when used in slow networks or over the Internet. This is now enhanced by caching the metadata on the local machine. As long as the metadata doesn't change the local copy is used.2009-07-214.x2009-08-204.5.27
AllYou cannot connect to the CRM offline service (localhost:2525) because the offline service doesn't provide the discovery service that is used in the logon form. A new button allows to explicitly connect to the offline service.4.x2009-08-204.5.27
ISV Config and Sitemap EditorThe application was terminated when the ISV Config or Sitemap couldn't be loaded successfully. Exceptions are now properly handled and displayed.2009-07-214.x2009-08-204.4.26
FetchXml WizardYou were unable to remove an order node in the designer window and had to open the order dialog to change it. You can now select the Delete command from the context menu or simply hit the delete key when the order node is selected.2009-07-214.x2009-08-204.4.26
FetchXml WizardThe Result View tab showed the data in a master/detail view, making it difficult to read the data. It now displays all values in a single row.2009-07-214.x2009-08-204.4.26
Logon DialogThe Logon dialog displayed the name of the discovery server in the profile dropdown. It should have been the profile name though.2009-07-214.x2009-08-204.4.26
AllAll editors now have a search and replace functionality. It's available by pressing CTRL-F.4.x2009-08-204.4.26
FetchXml WizardThe Execute Query button was disabled when inside the XML view. This was intentionally. It is now enabled in the designer and XML view and executes either the query in the designer or the query you have entered in the XML editor.2009-07-214.x2009-08-114.4.26
FetchXml WizardDue to the new auto-complete feature an error was displayed in the FetchXml source window. The error was a missing version attribute in the fetch element. According to Microsoft's Fetch schema the version attribute indeed is required and is now automatically set to "1.0".2009-07-234.3.x2009-08-114.4.26
Code GeneratorThe VB.NET template contained an IIf statement that could lead to a null reference exception. 2009-07-244.x2009-08-114.4.26
Code GeneratorA new method named "Merge" is included in the C# and VB templates. Is is used to merge the properties of two dynamic entities. The modified template is available in the Stunnware Tools download area.4.4.26
Code GeneratorWhen accessing party list, owner or customer fields that don't have a value (Nothing) a null reference exception is thrown. The modified template is available in the Stunnware Tools download area.2009-07-174.x2009-07-174.4.26
Code GeneratorA new method named GetProperties is now included in the code templates. It returns a PropertyCollection containing all properties of the instance you are working with. This collection can be assigned to the Properties property of a DynamicEntity instance. The documentation was updated accordingly.2009-03-174.x2009-03-194.3.22
Code GeneratorAn error in the GetLookup method of the BaseClass.vb template resulted in an error when accessing a lookup property with a null value.2009-03-164.x2009-03-164.3.22
FetchXml WizardA new aggregate was added to FetchXml, the CountColumn aggregate. Version 4.3.21 fully supports CountColumn, but you have to run CRM 4.0 Update Rollup 2 to use this functionality.2009-03-114.3.21
FetchXml WizardWhen creating .NET code based on a query and executing the code, an exception is displayed when using custom entities and/or attributes. The error occurs because the RetrieveMultiple method is executed to request data from the CRM server without returning dynamic records. The call itself succeeds, but on the client side the XML deserialization process tries to convert the data to an array of custom entities that are unknown to the Stunnware Tools application and therefore it breaks.

However, the purpose of compiling and executing the .NET code is to trap the SOAP messages, which does work, so a modification of the code is not necessary.
2009-02-194.xwon't fix
Customization ComaprerA new option was included to ignore object type codes. Object type codes differ between systems and ignoring them helps identifying the real changes. Object type codes are used in entity definitions and view layouts. When object type codes are ignored, then a view layout is considered unchanged if it only differs by the "object" attribute.2009-02-054.x2009-02-094.3.21
FetchXml WizardAfter executing a the FetchXml query, the number of returned records is now shown in the information area at the bottom.2009-01-304.x2009-02-024.3.21
AllA new build is available for testing. Please refer to the download page for information.4.3.20
SetupThe application may not function properly on a 64-bit machine. The next version will have two setup packages, one for the x86 and the other for the x64 processor architecture.2009-01-054.2.15
FetchXml WizardA null reference exception is thrown when adding a linked entity.2008-10-234.2.142008-10-234.2.15
DocumentationThe DefaultTopic option was added to the description of the HTML Project file reference.2008-10-23
CRM DocumentationThe default page in the help file is set to a non-existing topic.
Note: To specify a default topic, include the following option in the HTML project XML file:


...
entityList.htm
...


"entityList.htm" is just an example and can be replaced with the name of any existing HTML file.
2008-10-134.x2008-10-174.2.15
CRM DocumentationThe generation of help topics failed when used in an organization that was upgraded from CRM 3.0.2008-10-094.2.132008-10-114.2.14
Metadata ViewerThe attribute list in an entity detail view shows 0=Stunnware.Crm4.CrmMetadataService4.LocLabel(1). Instead it should read 0=Active(1).2008-08-284.1.92008-08-284.1.10