Tuesday, May 21, 2019

"An error occured during report data sets execution" error during printout of production job card

If you get this error during printout of a job card, it could be because the barcode validation didn't pass. Length and content of the barcode is validated during the report generation.

Because of how the failed validation is handled you only see this:

Even though there was actually recorded more information for the infolog:

I have opened a support case for this, and hope it will get fixed.

Monday, April 8, 2019

Workaround to new error during import of security setup

As a new feature to the security setup export and import, Microsoft has added information about objects being disabled/deleted, so the receiving system is able to pick that up too.

But if you both update an object and then disable it, you have created a combination of actions that cannot be imported. This is the error you'll get during import:

The technical reason reason is that the import deals with deleting/disabling objects before it deals with the updates. So when it gets to the update part, it cannot find the object.

The workaround is to pull out your best scissor software and cut out the update part of the XML. Here is an example where I have tried this with the TestEssentialsRole role:

Surprisingly to me is that this, according to MS support, works exactly as designed.

Thursday, April 4, 2019

Missing articles from

Microsoft is apparently doing some spring cleaning and streamlining of their different blogs, so you'll probably notice articles being removed from

Some articles are moved to another blog platform over the spring, and some are just gone.

Well, not totally gone. The Wayback Machine project has been able to help me out with a couple of articles I was missing.

For example this one:

Wednesday, April 3, 2019

Debug external assemblies

Recently I have had the need to understand what was going on inside one of the exchange rate import providers and also the security settings import. Both are only delivered as dll's, which you can find in the bin folder.

To see a decompilation of the code in the assembly, there are several different tools you can use to load it. These are the ones I have some experience with:

They all have that in common that you open the tool, select the dll of the assembly and let the tool decompile it. Here is an example of how that could look for the exchange rate provider I was looking into:

You can also use these tools to look into compiled label files. I sometimes use that when I need to find a particular translation. That could look like this (the language is danish if you wonder):

For the security settings import issue I had a need to debug it to figure what was going on, and in the following I'll try to explain how to do that in the most simple terms as possible.

To be able to debug you need to a have some symbol files. The .NET Reflector Visual Studio integration has a tool for generating these from the compiled dll:

In the following dialog you choose the assembly:

When the PDB's are generated, you can see that a new symbol location has been added to the debugger options:

A few other properties in the debugger options needs to set in a particular way:

Now just add a breakpoint to wherever X++ calls out to the assembly, and you are all set.

Here is a screen clip from a session:

The experience it not totally perfect. The watch windows has problems with some variables and objects because of some "optimization" going on. Check the last link in this article, for a suggestion on how to deal with that.

You must be an administrator to install these tools on the developer box. That means the box must be cloud hosted and not Microsoft hosted.

As an MVP I have been offered a free license of .NET Reflector from Redgate. That is why I'm able to use this particular product for the example.

And I got great value from reading these blog posts, to figure how to setup .NET Reflector debugging:
Disabling Optimizations when Debugging .NET Framework Source Code

Wednesday, January 23, 2019

Monday, January 21, 2019

The April 2019 release notes are out

Here is the starting point for release notes: And a direct link to the April '19 release notes:

Let me just point out a few areas of particular interest for D365FO developers and the likes. I don’t have more details, than what’s in the document. I guess that not all these features are ready from April, but something we should see later during spring and summer.

Remote desktop access will be disabled for, at first, Tier-2 to Tier-5 environments. You will however get a way access the Azure SQL database for an environment.

New customers will not be able to host development machines on the Microsoft managed Azure subscription. Tier-1 environments managed by Microsoft will be test and configuration environments only, with no remote desktop access. Development environments must be deployed to the customer’s Azure subscription. We will however also see possibility to do development on a local machine and it will be possible to work on more than one application from the same environment.

The build automation framework will run directly on Azure DevOps build capabilities. We will no longer have the requirement of a dedicated VM to act as a build server. A build that is a release candidate can be automatically uploaded to LCS and automatically be deployed to sandbox cloud environments.

The release task for uploading a built package to LCS is already released. Check out these links:
First Azure DevOps Task Released!
Azure DevOps Release Pipeline

Tuesday, January 8, 2019

Look up the text for a label in other languages than en-us

The dev boxes only comes with source label files files for en-us, so finding a text from a label in another language is not easy.

You could use a tool like RedGate .NET Decompiler to decompile the dll's of the compiled label files.

But, new to me, you can also just use the Meta Data API of Dynamics like this example:
https://[baseuri]/Metadata/Labels(Id='@SYS333000', Language='da')