Rebuild AX tables Indexes

Recently after importing of 100 000 products in AX 2012 R3 RTM version , I have faced some performance issue in released product form when data refresh through F5. So its good idea to rebuild the indexes after some heavy import of data. Here is the step to rebuild indexes.

  1. rebuild the indexes
  2. do performance benchmarking on key processes
  3. analyze what indexes could be optimized
  4. make those optimization changes to tables in AX AOT
  5. rebuild the indexes
  6. do performance benchmarking on key processes
  7. repeat steps 3-6 as necessary

 

Advertisements

Custom logic execution after completion of AIF document process

updateNow  – AXD document class method

Recently I have had the requirement to update some fields in my AIF document table after the document process completes. So to achieve the business requirement I have used UpdateNow method of ‘AXD‘ document class. UpdateNow method gets class when the document process completed and it can be used to call custom business logic after the completed of document import/export e.g. validate the custom log of import process etc.

Here is the sample code which I have used

public void updateNow()
{
CAX_C7AccOrderStageHeader accountingOrderHeader;
;
super();
accountingOrderHeader = axbc_AccOrderStageHeader.cAX_C7AccOrderStageHeader();
CAX_C7AccOrderStageHeader::updateCounterPartyOnLines(accountingOrderHeader);

}