Placement of code
When you are programming, you have to think about where placing you’re code. Always try to place you’re code nearest to the source so it can be manipulated easily. For instance code that manipulates tables should be placed in that tables methods.
Best Practice: Try to minimize the x++ code in forms for the following reasons:
- Forms do not support inheritance. You cannot share logic implemented in a form with other application objects.
- The X++ code implemented in forms is always executed on the client. This means that you cannot tune an application by specifying where to execute the code.
Tags: Ax 4.0, Ax 5.0 (2009), Best Practice, Dynamics AX, Programming, Tips & Tricks, X++
This entry was posted on Tuesday, February 16th, 2010 at 18:00 and is filed under Dynamics AX. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

