Some time ago, I shared my thoughts on the 'construct' pattern, which is commonly used in AX. While I often make use of it, it’s not without its flaws—it can actually violate some best practices. (I’ll cover the issue of deep class hierarchies resulting from this pattern in a future post.) First, it’s worth noting that you can customize the compiler level and the best practice checks it performs. To do this, compile something to bring up the compiler output window. Then, click the Setup button to adjust the settings. For this example, I used compiler level 4 and enabled all best practice checks. Now, let’s create a simple class. This class will simply display information from an InventTable record. 1. ClassDeclaration As we start designing this class, it quickly becomes clear that we need to declare an InventTable record as a member variable. /// <summary> /// Class written to test the construct and new... patterns /// </summary> /// <remarks> /// De...