Friday, February 17, 2017

How to improve performance of Display Method - Dynamics AX


Display methods are very useful but they affect the performance of your solution.

AX gives a mechanism to enhance the performance of display method by caching the display method.

There are two options to do that:

1) Override the FormDatasource init() method and add the following code:

    public void init()
    {
          super();
      
          DataSource_ds.cacheAddMethod(tableMethodStr(Table, displayMethodName), false);
    }


2) AX 2012 has also given a feature called Declarative Display Caching

    This allows us to enable caching by setting CacheDataMethod property to Yes, No or Auto.

Improving quality !!!

No comments:

Post a Comment