Wednesday, 25 February 2015

Simple Steps to export model in ax 2012

Through Powershell

Export :

Step 1 : Go To > administrative tools > Microsoft dynamics ax 2012 Management shell 

Step 2 : Right click on it and click on run as administrator

A command window will open.

Step 3: Now write the path

.> PS C:\Program files\Microsoft Dynamics Ax\60\Server\<Application Object server Instance Name>\Bin> axutil.exe export /file:C:\UserModel.axmodel /Model:"USR Model"

step 4 : now press enter

after that you will get a message on command window that your model has exported successfully

Note : Please mind the spaces while writing command.

Delete :

PS C:\Program Files\Microsoft Dynamics AX\60\ManagementUtilities\
axutil delete /model:X Model

Import

PS C:\Program files\Microsoft Dynamics Ax\60\Server\<Application Object server Instance Name>\Bin> axutil.exe import /file:C:\UserModel.axmodel /verbose





Monday, 23 February 2015

How to set range on list page form in ax 2012

Go to listPageInteraction Class of particular form.

In My case I am using SalesTableListPageInteraction class

Override Method : initializeQuery()

and write below code on that method.


public void initializeQuery(Query _query)
{


QueryBuildDataSource    qbds;
 
 qbds = _query.dataSourceTable(tableNum(SalesTable));
 qbds.addRange(fieldNum( SalesTable ,SalesStatus)).value(queryValue(SalesStatus::BackOrder));
   
 super(_query);
}