Conform code to organization policies

Completed

When coding, developers should be mindful of best practices to ensure that their code meets an organization's policies. When performing a build in Visual Studio, the system will run a best practices check, and the output window will display best practice errors or warnings. Developers can also choose to code their own best practice rules by using the Code Best Practice Framework or by deriving a class from the BestPracticeMetadataChecker. The Code Best Practice Framework is used to analyze and diagnose problems with X++ source code.

Global best practices that you should consider when writing code include:

  • Comments should be used in code so that others understand the purpose and approach of the code. This is the best way for developers to communicate, and often multiple developers are modifying and maintaining code at the same time.
  • When creating new elements, you should use a naming standard with your organization.
  • Each element should have a label added in the Properties window to provide text for that element in the user interface.