Wednesday, 28 January 2015

delete all the trascation data from AX



1. go to the class SysDataBaseTransDelete  and open the run method and click on run then it will prompt a dialog box which will prompt to delete if clicked yes  then it will be deleted.

refer the above screen shot

Tuesday, 13 January 2015

No of records in the tables in ax 2012

Dear All,

In ax we  see the no of records for all the tables  same time we can search for any table over there by doing control G but please make sure the the search process is ended.

tools>>noof records












Thursday, 8 January 2015

code to generate random numbers in AX every time

static void Job150(Args _args)
{

//code to generate the random number
int dice;

dice = (xGlobal::randomPositiveInt32() mod 6) + 1;

print dice;
pause;
}

simple tips for AX coding which may work out


Sometimes, when developing, AX doesn’t work as expected, or behaves weird.
Here are some of the things you can try if you run out of ideas, roughly in the order I do:

Try again
You probably already did, but make sure you can reproduce the problem. If it only occurred once, it’s not a problem.

Check your code again
Check your code carefully for errors, and maybe ask a colleague’s opinion.

Compile
Your project might contain compile errors, so compile it to be sure.

Close the debugger
Sometimes, when the debugger is active, AX will keep executing ‘old’ code. Close the debugger to make sure the latest code is executing.

Compile forward
When you have modified a class that is inherited by other classes, you might want to compile forward this class.

Synchronize data dictionary
You may have made changes to application objects that haven’t been synchronized with the database. Open the AOT, right click on the Data Dictionary node and choose Synchronize.

Clear the usage data  and clear the cache for elements, form, other item from the

Tools>>option>>clear the usage data
Tools>>clear CACHE.

Restart AX client
Simple as that, close the AX client and start it again.

intercompany PO multiple product receipt by x++

public void processStampICPO(PackingSlipId _deliveryNote,                             Transdate _deliverydate,                             ...