Thursday 10 May 2012

Data Consistency Check Framework in Dynamics AX 2009



The consistency check framework consists of classes with names ending in "ConsistencyCheck."
The consistency check in Dynamics AX validates only the predefined list of tables for each module. This ConsistencyCheck framework is heart of Dynamics AX. Unfortunately there is no much documentation available online on these topics. The intention is to provide some basic details about these classes.
SysConsistencyCheck Class is the base class which is extended by several classes in different modules. All the classes which are extending it override the run method. In which they specify the relevant table names related to the modules, they are checked by the kernelCheckTable or kernelCheckRecords methods. For more information on theSysConsistencyCheck class and its methods refer online documentation at the following link athttp://msdn.microsoft.com/en-us/library/aa674688(v=ax.50).aspx
To run the Consistency check go to Basic > Periodic > Consistency check
SysConsistencyCheckJob Class which helps in running and scheduling the Consistency check batch jobs.
The following are ConsistencyCheck classes from Dynamics AX 2009 which gives information about the class hierarchy and the configurations to which they belong.
Class NamesParent ClassConfiguration Key
SysConsistencyCheck
SysConsistencyCheckJob
SysSecurityConsistencyCheck
BankConsistencyCheckBank
CustConsistencyCheck
CustConsistencyCheck_BOECustConsistencyCheckCustBillOfExchange
CustConsistencyCheck_LinkTableCustConsistencyCheckLogisticsBasic
docuConsistencyCheck
HRConsistencyCheck
EmplConsistencyCheckHRConsistencyCheck
CommissionConsistencyCheckHRConsistencyCheckCommission
InventConsistencyCheckLogisticsBasic
InventConsistencyCheck_ForecastInventConsistencyCheck_Table
InventConsistencyCheck_JournalInventConsistencyCheckLogisticsBasic
InventConsistencyCheck_OnhandInventConsistencyCheck_TableLogisticsBasic
InventConsistencyCheck_SetupInventConsistencyCheckLogisticsBasic
InventConsistencyCheck_TableInventConsistencyCheckLogisticsBasic
InventConsistencyCheck_TransInventConsistencyCheck_Table
SalesConsistencyCheckSysConsistencyCheckLogisticsBasic
VendConsistencyCheck_LinkTableVendConsistencyCheckLogisticsBasic
ReqConsistencyCheckSysConsistencyCheckReq
JmgConsistencyCheckJmg
JmgConsistencyCheck_dataJmgConsistencyCheckJmg
JmgConsistencyCheck_jobJmgConsistencyCheckJmgJob
JmgConsistencyCheck_payJmgConsistencyCheckJmg
JmgConsistencyCheck_setupJmgConsistencyCheckJmg
LedgerConsistencyCheckLedgerBasic
LedgerBudgetConsistencyCheckLedgerConsistencyCheckLedgerBasicBudget
LedgerConsistencyCheck_TransLedgerConsistencyCheckLedgerBasic
TaxConsistencyCheckLedgerConsistencyCheckLedgerBasic
CurrencyConsistencyCheckLedgerConsistencyCheckCurrency
PrintMgmtConsistencyCheck
BOMconsistencyCheckBOM
BOMConsistencyCheck_SetupBOMconsistencyCheckBOM
BOMconsistencyCheck_TableBOMconsistencyCheckBOM
ProdConsistencyCheck
ProdConsistencyCheck_JournalProdConsistencyCheckProd
ProdConsistencyCheck_TableProdConsistencyCheckProd
ProdConsistencyCheck_SetupProdConsistencyCheckProd
PurchConsistencyCheckProd
RouteConsistencyCheckProdRouting
RouteConsistencyCheck_SetupRouteConsistencyCheckProdRouting
RouteConsistencyCheck_TableRouteConsistencyCheckProdRouting
ProjConsistencyCheckProjBasic
ProjConsistencyCheck_ForecastProjConsistencyCheckProjBasic
ProjConsistencyCheck_InvoiceProjConsistencyCheckProjBasic
ProjConsistencyCheck_JournalProjConsistencyCheckProjBasic
ProjConsistencyCheck_SetupProjConsistencyCheckProjBasic
ProjConsistencyCheck_TableProjConsistencyCheckProjBasic
ProjConsistencyCheck_TransProjConsistencyCheckProjBasic
VendConsistencyCheck
VendConsistencyCheck_PNVendConsistencyCheckVendPromissoryNote
WMSConsistencyCheckWMSBasic
WMSConsistencyCheck_BOLWMSConsistencyCheckSalesShipments
WMSConsistencyCheck_JournalWMSConsistencyCheckWMSAdvanced
WMSConsistencyCheck_LocationWMSConsistencyCheckWMSBasic
WMSConsistencyCheck_PalletWMSConsistencyCheckWMSPallet
WMSConsistencyCheck_PickingRouteWMSConsistencyCheckWMSAdvanced
WMSConsistencyCheck_SetupWMSConsistencyCheckWMSBasic
WMSConsistencyCheck_ShipmentWMSConsistencyCheckWMSAdvanced
WMSConsistencyCheck_TransportWMSConsistencyCheckWMSPallet
WMSConsistencyCheck_WMSOrderWMSConsistencyCheckWMSAdvanced
WrkCtrConsistencyCheckWrkCtr

These are the ConsistencyCheck frame work classes for different modules in Dynamics AX 2009 being covered in the above list.
To know more information on the configurations to which they belong visit this link here.

Minor fix in the below class

LedgerConsistencyCheck class is responsible for validating the General ledger module.
LedgerConsistencyCheck class checks these following tables in the run() method.
List of Tables
  1. LedgerTable
  2. LedgerJournalTable
  3. LedgerTableAlternative
  4. LedgerTableAlternativeTrans
  5. LedgerParameters
  6. AssetLedgerAccounts (Missing)
Add the AssetLedgerAccounts table to the LedgerConsistencyCheck class at end of its run() method as shown in the below image. The accounts for Fixed Assets in chart of Accounts hold references to the data in 'fixed assets in posting profiles'. By including the above table in the class will help to check and improve the data consistency.
AX2.jpg
The LedgerConsistencyCheck class should look like the above image in AX 2009.
Note : This above fix is not required in Dynamics AX 2012.

No comments:

Post a Comment