X++ Code Optimzation
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 feteching 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
caculated 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,insertion use
RecordSet Based operator like
update_recordset , delete_from and insert_recordset .
6. Aggregate Function: Use sum, avg, minof, maxof and count where
applicable. Because this can utilize the database’s
built-in function instead of calculating and analyse
data in Axapta.
This blog is for Dynamics AX (AXAPTA) Developers,this will help you for your development issues. This site contains some Microsoft Dynamics AX X++ Codes for use in your day to day use.
Subscribe to:
Post Comments (Atom)
Ledger Voucher creation Framework and x++ code to create ledger voucher
Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...
-
{ "Message" : "Please verify that the user is valid and set up correctly." } Sol: System Administration > Se...
-
Please click here to access Custom Workflow step by step process:
-
FormRun formRun = sender.formRun(); Object inventTrans_ds = formRun.dataSource(formDataSourceStr(InventMarking,InventTransO...
No comments:
Post a Comment
Give me the commetns and solutions