Pages

Friday, July 19, 2013

How can I see the SQL query that the Dynamics AX Kernel is generating for my Form?

When you are debugging your solution you sometimes might want to see the SQL Query the Dynamics AX Kernel has generated for your Form. 
While you can of course trace this directly at your Database Server, you also can do this in X++ using the QueryBuildDataSource class.

Let's imagine you have a Form that has PurchTable as Data Source. You have to override the executeQuery method of the PurchTable Data Source and add the following code:

public void executeQuery()
{
   Query q;
   QueryBuildDataSource qbds;
   ;
   q = this.query();
   qbds = q.dataSourceName("PurchTable"); //Replace with the                                                 current Table
   info( qbds.toString() );

   super();
}

Thursday, July 11, 2013

Data Import/Export through Excel in AX 2012

Hi All,

Following is the link which is useful for data Import/Export with Excel in Dynamics AX 2012

http://ax2012exceldataimport.blogspot.in/