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

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


Diagnostics and Information page, a reminder

As I keep forgetting that these pages exist, I am re-blogging the following information as its very useful :), and maybe I will eventually remember these URL’s.

Debug Information (on premise only)

Here are some bookmarklets that you can drag to your bookmarks bar which should allow you to just click on them while on a CRM instance, and the appropriate pages should pop up.

Dynamics 365 service status tip

A nice little tip to get updated on Dynamics or Office 365 service status.

Virtual Entities for pulling in CRM data from other instances

A new feature in Dynamics is the concept of Virtual Entities.  This allows an entity to be created in Dynamics  where its data is not actually stored in Dynamics.  Its read only at the moment, but it allows you to pull in data from any ODATA data source, and display it in Dynamics as if it were part of the system, and that includes displaying data in quick view forms, grids, advanced find etc.

Now, one of the issues I have come across within my CRM experience is a requirement to pull in data from one CRM environment, into another.  This has generally involved data migration, or some sort of costly integrations.  So, with this new feature, I wondered if it would help solve this issue.

Well, it does and it doesn’t.  When trying to use Virtual Entities to pull in data from one CRM environment to another, I discovered a pretty big flaw, and that is authentication.  From one CRM environment, trying to get it to authenticate with another environment while querying the ODATA endpoint is tricky, or even impossible.  I didn’t spend too much time on trying to solve this, I just assumed it was a no go, so to be able to test Virtual Entities, I decided to throw all security concerns out the window, and come up with a simple test solution.

So, my plan was this :

  • Create my own ODATA web service
  • Connect to a CRM instance that contains the data using a specific user account
  • Pull out the CRM data, and present it in an unauthenticated ODATA endpoint.

Yes, yes, I realize that’s a bit scary (exposing CRM data without any kind of authentication), but this was just a test.  So, I now have an endpoint that proxies queries against the Contact entity.  So, the following URLS should return data from my CRM test environment, without requiring any username.



So, now that I have that very basic web service, I can now configure my new Dynamics 365 version 9.0 environment with an ODATA data source.

So, from the Settings, administration page, I can do the following :

And configure it like so:

And in my test solution, I create a new Entity and mark it as a Virtual Entity.

And configure the appropriate fields to match the information my web service is returning:

Now, if I do an Advanced Find in the CRM that does not contain any Contacts, but instead choose my new External Contacts, it shows the information from a completely different CRM environment.

And clicking on one of the records shows it in a normal “Read Only” form.

Bear in mind that it also supports all of the standard filtering criteria as well so you can filter the views, choose columns etc.

Now how great is that.  I think these Virtual Entities could be one of the best new features for Integrations I have seen in quite a while.  No more having to mess with Web Resources pulling in information from other systems.  No, instead, just treat the data in other systems as part of your main database, read only of course.