Sunday, August 28, 2016

Test Data Transfer Tool - Export only tables where the name start with

Hi Guys

At this link you can find useful details about to use the Test Data Transfer Tool.

I would like to share how to export only tables where the name start with specific characters.
In this case, as you know we have to use the regular expression.
Therefore, for instance, if we want to export ONLY the DMF tables the syntax will be:

Practically, create a new txt file, move the expression above and finally copy the file inside the Lists folder.

The example above is useful also to move the DMF Setup from one Environment to another.

Stay tuned!

Monday, July 4, 2016

TFS BUILD Start but nothing happen

Hi Guys

Sometimes happen that you run the Build Process, this one start, but does not happen nothing!

Also nothing is mention on Event Viewer.

After some investigation, I verified that the User that ran the Build is been different respect the Build Owner agent.

Also through Login on the TFS Build Server using the Build Owner Agent, the access to the TFS, etc. coming with other credentials.

I had the confirmation through the Credential Manager, opened from the Control Panel.

In order to fix the issue, I have:

1-      From the Credential Manager, Generic Credential, I removed all entries 

2-      I issue the follow command, “rundll32.exe keymgr.dll,KRShowKeyMgr” and removed everything related TFS

After that, reopen Visual Studio and all started again to work fine!

Enjoy with TFS!

Saturday, February 20, 2016

TFS – Export Changeset with relative WorkItem


Many of you use TFS in order to track the Development, Bug, Rework, etc. WorkItems.
Could be useful have a list of all Changesets with relative workitem, Owner, Estimation, Custom tag.
A really good script to achieve this result, is a PowerShell Script that you can find here

You can modify as per your needed, you can filter per Date, User, etc.
Take care in the Export to CSV file command, especially on the Group by “Group ServerItem”.
From my side, many Changesets had the “ServerItem” tag empty.

Enjoy with TFS!

TFS BUILD : The tools version "12.0" is unrecognized. Available tools versions are "2.0", "3.5", "4.0"..

Hi All

During the TFS Build you can face the error “The tools version "12.0" is unrecognized. Available tools versions are "2.0", "3.5", "4.0"

This error is triggered during the command SysTreeNodeVSProject::importProject(@filename) and so it’s related the C Sharp Projects.

In order to fix, there are two options:

1-      Install Visual Studio 2013

2-      Install MicrosoftBuild Tools 2013

All the best!

Thursday, December 31, 2015

AX 2012 - RunBaseBatch Multithreading

Hi All

In AX 2012 Microsoft introduced the new framework (Business Operation Framework service) in order to consume a Batch process especially in Multithread.

But, you can use also the "old" RunBaseBatch class.
About it, take a look to this very interesting POST.

In order to submit a "task" class you can use two methods :

1- "AddRuntimeTask" method.
Adds an instance of a dynamic BatchTask to the BatchHeader.  The BatchTask added exists for only the current run.  It gets copied into the history tables and deleted at the end of the run.  The second parameter, inheritFromTaskId, copies settings such as the batch group and child dependencies from the task specified.

2- "AddTask" method.
Adds an instance of a BatchTask to the BatchHeader.  The BatchTask represents a batch-enabled class that will be scheduled for execution as a task by the BatchHeader.

So, you have to use the first one method otherwise if the process is recursive also the previous child completed tasks will be moved in running state together with the new tasks.

Happy new year!!


Tuesday, December 29, 2015

AX 2012 – Export Model Error: The file exists

Hi Guys

Never seen this error? If not, you are lucky!
I faced it during the TFS Build Process. The service is associate to the USER 1.

The strange thing is that the same command run with the User (USER1) works fine. The issue coming running the command in the USER 2 session (RDP Session) and impersonate USER 1.
I didn't understand the reason, so the workaround is been to create a new Active Directory user and associate it to the TFS Build Service.

That's it!

AX 2012 - AOS Freeze or Crash during CIL Compilation

Hi All

Today I’d like to share an issue that took a lot of my time!
I'm using AX 2012 R3.
At a certain point, the CIL Compilation failed and the AOS crashed or freeze without any errors that could help me.

For my lucky I use TFS so I try to verify the last check-in, one by one.

Finally I found the problem.

The code below cause the AOS Crash or Freeze during CIL Compilation, Incremental and Full as well.

public void updateRecordsetList()


    CustInvoiceTable    custInvoiceTable;

    CustinvoiceJour     CustinvoiceJour;

    CustInvoiceLine     CustInvoiceLine;

    update_recordSet CustinvoiceJour

        setting InvoiceAmount = custInvoiceTable.TotalAmount()

        join *

        from custInvoiceTable

        where custInvoiceTable.InvoiceId == CustinvoiceJour.InvoiceId

        join parentRecId, TaxAmount, AmountCur

        from custInvoiceLine

        where CustInvoiceLine.ParentRecId == custInvoiceTable.RecId;


The “TotalAmount” custom method of the CustInvoiceTable table contain the following query:

Display amount TotalAmount()


    CustInvoiceLine     custInvoiceLine;


    select sum(AmountCur) from custInvoiceLine

        where custInvoiceLine.ParentRecId == this.RecId;


    return custInvoiceLine.AmountCur;


I know that the code isn’t properly written, but, I expect an error.

This issue coming after the last Kernel update.

Before, with AX 2012 RTM Kernel, the CIL Compilation raise an error like below.

Error 1. Class: XXXXX, Method: updateRecordsetList, Exception: System.NullReferenceException: Object reference not set to an instance of an object.

   at Microsoft.Dynamics.Ax.Xpp.ILGenerator.processBytecode(XmlNode childNode)

   at Microsoft.Dynamics.Ax.Xpp.ILGenerator.processBytecodes(TypeBuilder typeBuilder, XmlNode node)

   at Microsoft.Dynamics.Ax.Xpp.ILGenerator.GenerateIL(TypeBuilder typeBuilder, XmlNode node)

   at Microsoft.Dynamics.Ax.Xpp.ILGenerator.TraversePCode(XmlNode node)

   at Microsoft.Dynamics.Ax.Xpp.PCodeTraverser.TraverseMethod(XmlNode methodNode)

   at Microsoft.Dynamics.Ax.Xpp.ILGenerator.GenerateXppModule()

So, with the last Kernel Microsoft introduce something…

I raised a Support Case and Microsoft suggestion is been modify the BP check (around line 222) in the “checkSource” method of the “SysBPCheckMemberFunction” class:

        // Check if setting value from valid function in update_recordset statement

        if ((textBuffer.find('update_recordSet'))

         && (textBuffer.find('setting',textBuffer.matchPos()+textBuffer.matchLen()))

         && (textBuffer.find('=',textBuffer.matchPos()+textBuffer.matchLen()))

         && (textBuffer.find('(+)',textBuffer.matchPos()+textBuffer.matchLen()))




            if (!isComment())


                this.addSuppressableWarning(#BPErrorMethodUpdateRecordSetCheck, matchPosLine, matchPosColumn, strFmt("Are you setting a value from a supported method in update_recordset?"));



With this modification at least the Developer will not be able to compile the object because will raise a BP error.

From my point of view, this issue is time consuming because could take a lot of time.

I hope that Microsoft will improve the Compilation process in order to avoid an AOS crash.
I also create a suggestion in Connect,

Stay Tuned!