AOT Maps – the consistent approach to access same data
The AOT maps residing in the data dictionary is very useful element under DD node after tables, enums and EDTs. Perhaps they aren’t as widely used as they should be in usual application programming. However, they have the power to solve some key daily problems in AX running in the production environment. Map defines X++ […]
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 […]
Range of RecID in an AX Table
In every new table the recID (surrogate key) range starts from the no. 5637144576 and since it is int64 so it goes upto 2^63 (9223372036854775808). It also signifies an important fact that we can’t have unique recIDs accross different tables.
Manipulating a form datasource in a class.
It is possible to pass a datasource bound to a grid in a class and then iterate like a query. In this post, I’ll giving some code snippets to work with form datasource in some other object like classes. Step 1: Your method or constructor of the class should be able to recieve FormDataSource type […]
Separate workspace for development in AX 2009
Finally Microsoft has come up with different separate wrokspace for developers of AX. If you have access to the latest build of AX 2009, you’ll notice the absence of all development related tools. Only AOT can be accessed by clicking Ctrl + D (I think they’ll move it away too). For doing all kind of […]
How to check configuration key in code?
Q: How can I check whether the particular configuration key is enabled or not in the code at runtime? A: Simple, you can use the function isConfigurationkeyEnabled(configurationkeynum(LedgerBasic)) anywhere in the code. It returns a boolean type.
Test Driven Development
A good link to know about tools and theory of TDD (Test Driven Development) http://www.testdriven.com
Setting a table field mandatory doesn’t allow zero to enter
In Dynamics AX if you set any integer or real type field of a table mandatory, then it would not allow 0 to enter in that field. Whenever a user enters 0 and move to the next field the following infolog message appears. Field ‘fieldname’ must be filled in. But if you don’t like this […]
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 […]
My Programmer Personality Type
The following results are taken from http://www.doolwind.com/index.php?page=11 ================================================================ Your programmer personality type is: DLSB You’re a Doer. You are very quick at getting tasks done. You believe the outcome is the most important part of a task and the faster you can reach that outcome the better. After all, time is money. You like coding […]