Saturday, December 31, 2016

AX 2012 - One or more conflicting model elements already exists in an installed model. How to know the conflict element.

Hi All

How many times during a model installation you faced the error "One or more conflicting model elements already exists in an installed model."?

In order to install the Models usually I prefer use the Powershell command, like Install-AXModel with "-verbose" option just to see more details in case an error.

Unfortunately the "-verbose" option do not help us to find the element in conflict.

Instead, using "-verbose" option together with AxUtil resolve our issues. In this case is showed the element name that generate the conflict.


Tuesday, December 27, 2016

AX 2012 – How to move DMF Setup across Enviroments

Hi Guys

Often is necessary to move the DMF Setup, without include the DMF Staging tables, from one environment to another.

How to do it?

Out of the box there isn’t any standard feature that allow you to achieve this goal.
The steps are:

1-      Retrieve a list of the DMF Setup Tables
2-      Move to another environment without broken the relation by Recid

About the first step I have created a job in order to list the DMF Setup tables.
The trick is been exclude the tables that present the EXECUTIONID field, so the staging table!

static void DMFSetupTables(Args _args)
    utilIdElements  utilIdElements;
    DictTable       dictTable;
    SqlDictionary   SqlDictionary;
    Map             mapTable;

    mapTable = new Map(Types::Integer, Types::Integer);

    while select utilIdElements
    where utilIdElements.recordType == UtilElementType::Table
       && like "DMF*"
        dictTable = new DictTable(;
        if ( dictTable.isView()
        ||   dictTable.isTempDb()
        ||   dictTable.isTmp()
        ||   dictTable.isMap()
        ||   mapTable.exists(
        Select recid from SqlDictionary where SqlDictionary.tabId == && == "EXECUTIONID";
        If ( SqlDictionary )

        info ( queryValue( + "-" + );

About the second step, I used the Test Data Transfer Tool in order to export and import the DMF Setup tables.

Therefore, I created a txt file like below with the Tables list coming from the above Job and move in the ‘[Lists]’ Folder of the TDTT Package and run the Tool.


That’s it!

Happy Christmas!

Sunday, December 11, 2016

AX 2012 - Create AX Users from a CSV file through Powershell

Hi Guys

If you want to add the AX users starting from a CSV file, here the Powershell script.
In the CSV there is the column Master where you can specify the Master user from which they are copied the security and attributes.

Is a good start and you can extend as preferred.


Tuesday, November 22, 2016

AX 2012 - How to Add Linked Datasource using parent Datasource fields

Hi Guys

Can happen to add Datasource to a query using fields related to other parent Datasource.

In order to achieve this goal, the trick is use the third parameter of the AddLink Kernel Method of the QueryBuildDataSource class, like this:

qbdsXX = SysQuery::FindOrCreateDataSource(DataSource_ds.query(), tableNum(TableChild), tableNum(TableParent) );
qbdsXX.addLink(fieldNum(TableParent, FieldA), fieldNum(TableChild, FieldA));
qbdsXX.addLink(fieldNum(TableParent, FieldB), fieldNum(TableChild, FieldB));
qbdsXX.addLink(fieldNum(TableParentParent, FieldC), fieldNum(TableChild, FieldC), DataSourceParent );

Stay tuned!

Sunday, October 2, 2016

Tree Control issue during adding Child node

Hi guys

A colleague reach me because a Form with a Tree control did not work as expected.

The Child node added at runtime do not appear on the Tree, also after the Expand method.

The trick is use the SysFormTreeControl Class, expandTree method.

More exactly, at the end of the init of the Form are been called the following methods:

SysFormTreeControl::expandTree(tree, tree.getRoot());
SysFormTreeControl::collapseTree(tree, tree.getRoot());

Finally, after every new child added at runtime, is been raised only the expandTree method.

Stay Tuned!

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!