Adxstudio 7 solutions do not import into Dynamics 365 V9

Here is a bit of useless information for you!

I setup a trial of a V9 instance of Microsoft Dynamics 365 for some testing, and I found that the Adxstudio 7 solutions would not import.  The installer goes in, but installing the base portals solution fails.

To get round this, I converted the instance to a sandbox, reset it to V8.2, installed the solutions, and I intend to upgrade it to V9, although I will have to wait a week for the scheduled update to work.

So there you have it.  You cannot set up a new V9 instance to run old portal code on.

Solution export error, check SLA’s

Recently I had an issue where all of a sudden, a solution would not export from the development environment, even though it was previously fine, and as far as I knew, it had not changed.  Dynamics would throw a very unhelpful error, with no details of what went wrong.

I tried creating a new solution, and adding the exact same components and that one also failed, so I knew it was not the solution itself, but its contents.

After a bit of trial and error, I discovered that it was the SLA’s that were causing the issue.  Turns out that it was because one of the SLA’s had not been activated.  Never thought it needed to be, but in this case, it was causing an issue.

So, if it ever happens to you, make that one of the first things you check, it might save you some time.

This was a version 8.2 on premise install, but I didn’t have access to the actual server.

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.

 

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

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.

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.

Diagnostics
 

 
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.

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.

http://crmproxydata.azurewebsites.net/Contacts

http://crmproxydata.azurewebsites.net/Contacts?$filter=contains(Name,’Spencer’)

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.