Wednesday, 18 February 2015

Trace Parser command line paramters

If you want to automate trace file open/import, Trace Parser supports command line parameters.
Usage: Microsoft.Dynamics.AX.Tracing.TraceParser.exe [options]

/log=[filename] - Used to log messages t the specified file.

/register  - Register a new or existing database. Options:

    /server=[hostname] - Name of the SQL Server. Default to localhost.
    /database=[database] - Name of the SQL Database

/(open|import)=[filename] - Imports a Trace File. Options:

    /id=[id] - TraceId if the file is already imported.

/consoleonly  - Run in console only.
This posting is provided "AS IS" with no warranties. Use code at your own risk.

Monday, 9 February 2015

Phantom objects in USR layer after compile using AXBuild

Recently we performed a cleanup of USR layer and moved the objects (created wrongly in that layer) to CUS layer or removed them if they were not required as we are supposed to have nothing in USR layer. We then removed the USR model using AXUtil. This went well until we noticed that there are some objects in USR layer. These included some classes and forms. Recompiling was bringing these objects back even if we remove these.

Examining these objects, we found that none of these have any difference from the layer below. These phantom objects were created while the application was compiled using AXBuild. A client compile was not creating these phantom objects.

So we contacted MS and were advised to apply KB 3015739 which is a binary hotfix. This however did not fix our issue. One of my colleague later discovered that if we pass an additional un-documented parameter /layer=cus to AXBuild, these phantom objects are not created.

Not sure if this parameter was present before or it was introduced due to the KB that we applied but it fixed out issue.

We are on AX2012 R2 with CU7.

This posting is provided "AS IS" with no warranties. Use code at your own risk.

Wednesday, 4 February 2015

Report error in Dynamics AX

We had the following error while users were trying to print reports from AX.
The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:queryBuilderArgs. The InnerException message was 'Element 'http://tempuri.org/:queryBuilderArgs' contains data from a type that maps to the name 'http://schemas.datacontract.org/2004/07/XppClasses:SrsReportProviderQueryBuilderArgs'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver or add the type corresponding to 'SrsReportProviderQueryBuilderArgs' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.'.  Please see InnerException for more details.
The problem goes away if you point the SSRS to another AOS through the AX client configuration or by restarting the AOS.

This posting is provided "AS IS" with no warranties. Use code at your own risk.