Search This Blog

Monday, December 9, 2013

Caching inside AX

Hi Friends,

I found this useful article about "How Caching mechanism is been used inside the DAX..?"

Click here to read the content.

Happy Daxing..,
Sai
 

Tuesday, December 3, 2013

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.queryRun().args().caller(this);
        }
    }


   //Custom Code Start>>
  // Stopped manual Refresh on InventTable (Form)
    if ((_p1 == 2876) && // taskF5
        (this.name() == formStr(InventTable )))
    {
        return ret;
    }
   //Custom Code End <<

    ret = super(_p1);
    return ret;
}

Happy Daxing,
Sai.