X++ Code Optimization
X++ Code Optimization Following are the coding tips to improve your Axapta system's performance: 1. Smart Joins : Try to Use Joins instead of nested while loop wherever possible. 2. Select Statement : Mention the field names in the select statement instead of fetching entire row , this will reduce data amount to transfer from database. e.g " Select ItemId from inventTable " 3. Display Methods : Make sure that generic display methods should be moved at table level and cached by using"Formdatasource.cacheAddmethod". 4. Local caching : Use Variables for storing the constantly used calculated values in loop , by doing so you can reduce the calls to the database and different layers. 5. Monitor the Database Calls : For bulk records updation, deletion, ...