When using the Microsoft Dynamics AX development environment, you should follow a set of best practices. The X++ compiler checks the code for best practice issues. These issues can result in best practice errors, warnings, or informational messages.
In this article we covers Microsoft Dynamics AX application development best practices. They are recommended for any Microsoft Dynamics AX partner or end user who is developing or customizing Microsoft Dynamics AX.
These best practices apply to the following:
- Programming in the standard application
- Certified solutions
Following are the steps to check code and application objects for compliance with the best practices for Microsoft Dynamics AX.
- Open AOT by using short Key (CTRL+D)
- Select Tools > Options from above screen the following window will be shown
- Click the Development from left panel of above screen.
- Click the Best practices button. On above screen and the following popup window will show.
- As in the above screen the following Warning level list you can select that you want to perform also layer can be selected on which you want to perform best practice.
- Errors only
- Errors and warning
Note: the best practices are checked when you compile or check in an object.
We can also check best practices for one or more nodes in the Application Object Tree (AOT): right-click the node, and then select Add-Ins > Check Best practices.
Output will be shown with the following severity code:
- Information: Things that might be nice to know (shown in blue).
- Warnings: Things that you should strongly consider fixing (shown in yellow).
- Errors: Things that should definitely be fixed (shown in red).
In next article we will cover the Pest Practices of code Customization standards.