Skip to main content

Posts

Periodic maintenance and performance analysis in AX

Hi Friends, I recently came across a very useful article about the AX maintenance and performance. Which is actually explains about how the DAX DB is really being used for real data and temp data. In fact if you look into the DAX DB tables almost 60% of your DAX DB is being used by 4 tables unfortunately they are temp data i.e. INVENTSETTLEMENT, SYSDATABASELOG, SALESPARMLINE, INVENTSUMLOGTTS. Click here  to view the article. Thanks, Sai

How to stop manual Refresh (F5) on Forms in AX...?

Hi Friends, By doing a small code change in "SysSetupFormRun" class  we can stop the manual refresh(F5) on any form in AX. We need to add some code in "task( )" method. Ex :- public int task(int _p1) {     #task     FormDataSource formDataSource;     int ret;     if (_p1 == #taskFilter)     {         formDataSource = this.objectSet();         if (formDataSource &&             formDataSource.queryRun() &&             formDataSource.queryRun().args() &&             !formDataSource.queryRun().args().caller())         {             formDataSource...

How to add Filter functionality to Display method in dynamics AXAPTA

Hi Friends, Normally filters will work only in table fields but we can't do filters to display method. This below code will work for filters to display method also. Step 1: Go to the form design right click on particular control properties Auto Declaration No to Yes. Step 2: Override the context() method on the display method  . public void context() {     int             selectedMenu;     formrun         fr;     Args            ag;     Name            strtext;     querybuilddataSource qb1;     queryrun    qr;     query       q;     PopupMenu menu = new PopupMenu(element.hWnd());     int a = menu.insertItem('Filter By Field');     int b = menu.insertItem('Filter By Selection');     i...

How to pass control value in form to class in AXAPTA

How to pass control value from from to class in AX2009 Step :1 Write the method in Form level like : public str method1() {          return control.Text(); } Step 2: Write this code in class level where we need to use the value  if(formHasMethod(args.caller(), identifierStr(MethodName)))     {        strcustname =  args.caller().MethodName();        } Happy Daxing...!

Avoid warning message for "Empty compound statement" in AXAPTA

How to  avoid warning message like "Empty compound statement" in AXAPTA As: Simply call the below method inside your while loop or catch block to avoid best practice error Call exceptionTextFallThrough(); in the block. It does nothing, it's there just to say that you're intentionally not doing anything there (and to satisfy compiler). Happy Daxing.....

reRead( ) in AX 2009 - Best Advantage

Hi Friends, I hope all of you may already know about this, but I am forced to post it here. To avoid most of the UpdateConflicts / DeadLock errors while update a record in a table, just use the "reRead( )" method of the table before making any changes to the selected record of the table. Ex : ; ttsbegin; select forUpdate tSalesLine where tSalesLine.SalesId = = 'SO-1234567'; tSalesLine.reRead( ); tSalesLine.Feild1 = XXXXX; tSalesLine.Feild2 = XXXXX; tSalesLine.update( ); ttscommit; Happy Daxing.. AX Dude.