02 May, 2026

How to cache records on run-time in AX?

The simple answer is RecordViewCache class. This class is used to implement set-based caching in your code at run-time. 1.    First declare the variables. CustTrans                    custTrans; RecordViewCache      recordViewCache; 2 .  Call a nofetch query to create a record buffer. It will define the set of records that you want to cache. //Define records to cache select […]

1 min read

Setting up test data for unit Testing

We should make sure that the unit tests should be independent of data as much possible. For this purpose the Unit Test framework provided by David Pokluda also talks about two very important methods. setUp() and tearDown(). These are very important methods provided by all unit testing framework designed for any technology. setUp() deals with […]

1 min read