Saturday, February 28, 2015

AX 2012 - Debug doesn't work, breakpoint doesn't stop

Hi Guys

About this topic, you will find many post in google.

With my, I just want to underline a strange behaviour that I have faced.
Pratically, in my scenario, the Debugger opened ( with many "flash" ) but doesn't stop to any code.

So, after check the Microsoft links :

without success, I realize that the problem was related to the User Account Control (UAC) enable!

So, I have open Dynamics AX with administrative privileges and all worked fine!
Obviously, you can disable the UAC.

See you soon!

Monday, December 8, 2014

AX 2012 DIXF Service is unavailable or The client and service bindings may be mismatched

Hi Guys

If during the Data Import Export Framework validation parameters, you faced the errors :

1- DIXF Service is unavailable


2- System.ServiceModel.ProtocolException: Content Type application/soap+xml; charset=utf-8 was not supported by service http://Servername:7000/DMFService/DMFServiceHelper.svc.  The client and service bindings may be mismatched. ---> System.Net.WebException: The remote server returned an error: (415)......

You have to :

1- Unistall the DIXF AOS Component and reinstall it.
During the installation you will be able to specify the server name where Integration Services is Up & Running

2- Go through the Bin folder of the AOS Server, locate and edit the file Microsoft.Dynamics.AX.DMF.ServiceProxy.dll.config, set the endpoint address as :
Practically specify the Server where Integration Services is running.

More info at

Stay tuned!

Sunday, October 12, 2014

Dynamics AX issue ? No problem...

Hi All

In our job, often we have faced some errors or strange behaviors.
Also, often I seen a wrong approach about on figure out the issue.

In many case, the developers try to figure out the issue using debug.
In complex scenarios, the debug approach can take a lot of time and sometime not produce any result.

From my point of view, when we face an issue, the steps are:

1-  Check if there is already a hotfix provided by Microsoft using Lifecycle Services,, especially Issue Search.

2-   Search or post a question on the Microsoft Dynamics AX Community,
      Here you can work with many people that probably have already faced your issue and that can help in the right way to solve.
      Additionally, on MS AX Community you will have the pleasure to work with people that have a lot of seniority on Dynamics AX, both Technical that Functional.

3-   Raise a case on Microsoft,
Often, the Microsoft reply is very quick if found the issue in their internal database.
Otherwise, is needed some days just to replicate the case on their environment and provide you the relative hotfix.
Finally, you have the opportunity to help Microsoft to improve Dynamics AX and so have a product more stable for other Customers.

4-  Lastly, before debug, involve your functional colleague just to figure out if the issue can be related to a wrong setup.

Finally, if you have in mind something that could improve the product, submit your suggestions using Microsoft Connect,

Speak soon!

Thursday, September 4, 2014

AX 2012 - Retrieve a Dimension Value from a Index

Hi Guys

Below an useful code for retrieve a Financial Dimension value from an Index :

static DimensionValue DisplayDimensionValueFromIndex( DimensionDefault _DefaultDimension, int _level)
        DimensionValue      ret;
        if( _defaultDimension && _level )
            select RecId, Name
            from LedgerChartOfAccounts
            where LedgerChartOfAccounts.Name == curext()
                join ChartOfAccounts, DimensionHierarchy
                from LedgerChartOfAccountsStructure          
                where LedgerChartOfAccountsStructure.ChartOfAccounts == LedgerChartOfAccounts.RecId
                    join DimensionAttribute, DimensionHierarchy, Level
                    from DimensionHierarchyLevel
                    where DimensionHierarchyLevel.DimensionHierarchy == LedgerChartOfAccountsStructure.DimensionHierarchy
                       && DimensionHierarchyLevel.Level == _level;
            ret = DimensionAttributeValueSetStorage::find(_DefaultDimension).getDisplayValueByDimensionAttribute(DimensionHierarchyLevel.DimensionAttribute);
        return ret;


Monday, June 16, 2014

What are the differences between addOrderByField and addSortField

Hi Guys

With addSortField you can set "only" the records order.

With AddOrderByField you can build some logic because is used the kernel class QueryOrderByField.

So, you can use the follow methods :
- direction
- autoHeader
- autoHeaderDetailLevel
- autoSum
- autoSumDetailLevel
- datasource
- fieldId

You can find some examples on the standard class :

- DimensionProvider Class, getDimensionOrderBysFromQuery method
- InventDimCtrl_Frm_OnHand class, modifyQuery method


Sunday, May 18, 2014

OData Query Service - The exception message is 'Object reference not set to an instance of an object.'.

Hi Technophiles!

The server encountered an error processing the request. The exception message is 'Object reference not set to an instance of an object.'.

If someone have faced this error through browsing the link "http://aoshost:8101/DynamicsAx/Services/ODataQueryService/", the cause could be a query specify on the "Document data sources form" ( Organization Administration > Setup > Document management  ) that doesn't exist anymore.
So, from the form above, delete the queries that no longer exist.

Finally, if you faced problem with the link above, change the AOS server name with the IP address, like

See you soon!


Tuesday, April 8, 2014

Email Parameters - Retrieve SMTP Account Password

Hi All

If you don't know or remember the SMTP Account Password, you can use the code below :

    CryptoBlob  CryptoBlob;
    CryptoBlob = WinapiServer::cryptUnProtectData( (select firstonly SysEmailSMTPPassword).Password );
    info ( cryptoblob2str(CryptoBlob) );

That's it!