Welcome to my CRM Blog

Welcome to my new redesigned Dynamics CRM Blog.  My intention is to keep this more up to date than I previously had.

Hopefully this site will become a useful source of information regarding Microsoft Dynamics CRM

Microsoft.Crm.Entities.PluginType and PluginTypeNode: System.Xml.XmlElement caused an exception

I was getting this error when trying to import a solution into an On Premise Dynamics 365 environment.

This was a solution that I knew had previously imported into other environments, so I was very confused why it would not import.  Turns out, the Sandbox Processing Service on the server was not actually running.

Restarting the Service allowed the solution import to proceed.

I believe this must have happened as we had experienced a power cut, and I have certainly seen Dynamics services not restart properly when a server is not safely switched off correctly.  Also, it may have had something to do with the fact that this one little Virtual Machine server was running about 20 different CRM Organisations at once.

Anyway, never assume that its an issue with your solution.  Nine times out of ten, it is, but always remember to check your environment as well.

 

Dynamics Solution Dashboard

I have decided to release a small utility that I have been working on to assist me in my day to day work with Dynamics CRM.  A common requirement in the standard Development, Test, Train and Production environment setup is the moving of solutions between organisations, and version numbering.  One thing I often need to do is to check the version numbers of a solution across different CRM instances, to see if there are any discrepancies.

I needed a tool that could just do it for me with a click of a button and highlight any differences.

And so, here it is.

The application can simply be configured to connect to any number of CRM environments (within reason) and it will detect all of the solutions installed, and their version numbers, and show them in a grid.  Any instances where an environment does not have the same version number, the solution is highlighted.

To configure it, simply click the Settings button, and then the Connections button to add your connections. On the settings screen, you can enable and disable the connections you wish to view.  It should be fairly straight forward.

I shall probably be adding more features to it as I go, but for the first version, its already proving very useful to me, so thought I would share it.

If you wish to Download it, you can download the Zip file, extract it and run it.

Downloadable version of Dynamics Solution Dashboard

 

Portals Support added to CRM Utilities for Visual Studio

Get it on the Marketplace

I have updated my extension to support publishing of files from Visual Studio to Microsoft Dynamics Portals.

The tool now supports publishing files to Web Templates and Web Files, allowing you to use Visual Studio to edit and track changes of your portal related files, and quickly update Dynamics with the appropriate Portal files.

Web Files and Web Templates are simply listed within the Web Resource linker dialog for you to select.  You can then publish the appropriate files within your Visual Studio solution to Dynamics.

If you have installed the extension from the Marketplace, then it should prompt you to update, but if not, you can get it from the below link.

CRM Utilities for Visual Studio

Discord channel

I wanted to set up a global group chat for people within the Microsoft Dynamics Development space.  I use Slack at work, but the problem with that is the closed invite system.  It is difficult setting up Slack to allow people from different teams/companies if they have different email addresses.

Discord is traditionally a gaming chat system that works very similar to Slack, but is free, and with an appropriate Link, allows anyone to join specific channels.

So, I thought I would give it ago.  If you are reading this blog, then feel free to use the link below and join Microsoft Dynamics Discord channel and introduce yourself.

Microsoft Dynamics Discord Channel

 

System.MissingMethodException: Method not found: ‘!!0[] System.Array.Empty()’

UPDATE : Turns out this is down to compiling the Plugin with the .NET Framework 4.6 as opposed to 4.5.2.

Interesting new error message spotted in Microsoft Dynamics 365.

Not sure when this “new functionality” crept in to Dynamics, but if your developing and deploying plugins, watch out for this message.

It turns out that something has changed with the Trace Service and the Trace method in that if you try and do the following, you get the error:


ITracingService trace = context.GetExtension<ITracingService>();

trace.Trace("This message will cause an error");

Will give you the following error message :


System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'

Now this only seems to affect new plugins uploaded to Dynamics as I have a number of plugins already in there that has this kind of code.

The solution is to do something like the below:


ITracingService trace = context.GetExtension<ITracingService>();

trace.Trace("This message will cause an error {0}",string.Empty);

Very strange.  Just blogging about it in the hope that if someone googles that message, they will find a solution.

My utilities are now on the Visual Studio Marketplace

Just a quick update to say that all of my Visual Studio extensions are now on the Microsoft Visual Studio Marketplace, and are available to download and install direct from Visual Studio.

Visual Studio Marketplace

Simply go into the Tools menu and choose Extensions and Updates, select Online and search for me, James Hall.  My extensions are the top two in the list.

In theory, if you install them this way, you should get notified of when I update them.

Multiple connection support added to CRM Utilities

In a new update, the CRM Utilities for Visual Studio now supports multiple connections per project.  This is useful when you have multiple folders within each Visual Studio project, all linking to different Dynamics 365 Organisations.

Within the Web Resource linker window, you can now swap between connections and link a local solution file with a web resource from different organisations.

You can only link a file to a single organisation.

Also, in the options screen for the Class Generation tool, you can also specify which connection to connect to when generating classes.

You can download the new version below :

CRM Utilities for Visual Studio

Dynamics Documentation PowerShell Downloader

A common issue I am always faced with these days is the ability to have some Dynamics CRM / D365 Documentation, offline.  I am always a fan of PDF documentation that I can carry with me on my iPad, and since Microsoft stopped providing the usual CHM files with the traditional SDK’s, I have been at a bit of a loss.

With the advent of the new Documentation site that Microsoft have moved everything to, they now provide you with a handy option to download chunks of the documentation in PDF format.  Brilliant.

However, I don’t want to have to go through all of the sections to manually download the documents, and of course, what if, and how often do you need to do this to keep your documentation up to date.

Well, stand by for the amazing Dynamics Documentation PowerShell Downloader.  It really is quite simple, and feel free to add as many other documents as you wish to the script.  You can of course also modify it to save it to a different folder by changing the folder at the top of the script.  This goes hand in hand with the Dev Tools downloader that I blogged about previously.  Although the previous Script was provided by Microsoft, this one is all me 🙂


# Change the variable folder to the location you wish to save the Documentation to
$folder = "c:\DevTools\Documentation"

# Add the documents you wish to download below, in the format "filename" = "URL";
$documents = @{ "Customer Engagement Admin Guide.pdf" = "https://docs.microsoft.com/en-gb/dynamics365/customer-engagement/opbuildpdf/admin/TOC.pdf?branch=live";
                "Customer Engagement Customisation Guide.pdf" = "https://docs.microsoft.com/en-gb/dynamics365/customer-engagement/opbuildpdf/customize/TOC.pdf?branch=live";
                "Customer Engagement Developer Guide.pdf" = "https://docs.microsoft.com/en-gb/dynamics365/customer-engagement/opbuildpdf/developer/TOC.pdf?branch=live";
                "Customer Service User Guide.pdf" = "https://docs.microsoft.com/en-gb/dynamics365/customer-engagement/opbuildpdf/customer-service/TOC.pdf?branch=live";
                "Unified Service Desk.pdf" = "https://docs.microsoft.com/en-gb/dynamics365/customer-engagement/opbuildpdf/unified-service-desk/TOC.pdf?branch=live";
                "Customer Engagement Portals Guide.pdf" = "https://docs.microsoft.com/en-gb/dynamics365/customer-engagement/opbuildpdf/portals/TOC.pdf?branch=live";
                "Customer Engagement Field Service Guide.pdf" = "https://docs.microsoft.com/en-gb/dynamics365/customer-engagement/opbuildpdf/field-service/TOC.pdf?branch=live";
                }


md $folder -ErrorAction Ignore
cd $folder

foreach ($h in $documents.Keys) {
    Write-Host "Downloading ${h}"
    Invoke-WebRequest $documents.Item($h) -OutFile $h
}