O'Reilly logo

Microsoft Dynamics AX Implementation Guide by JJ Yadav, Yogesh Kasat

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coding best practices

In this section, we will learn some best practices to be followed during development in Dynamics AX.

Best practice check

Run your code through the X++ best practices process, evaluate all the best practices errors and warnings, and take the appropriate action.

Naming variables and objects

Begin the variable and method names with lowercase letters like custTable, validateFields, and so on. Begin the names of the AOT elements with capital letters such as CustTable, SalesFormLetters, and so on.

Prefix the parameters names with an underscore (Args _args). Use meaningful and self-explanatory variable names. For example: SalesTable salesTable and not SalesTable table1

Commenting the code

Code comments enhance the readability of the code ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required