The field with ID ‘0’ does not exist in table ‘LedgerTrialBalanceStagingTmp’
I’ve been trying to open a report in the General Ledger > Reports > Detailed trial balance. In the form, I input a parameter for Ledger account.MainAccount. When I click OK, I got an error:
Error executing code: The field with ID ‘0’ does not exist in table ‘LedgerTrialBalanceStagingTmp’.
Stack trace
(S)ClassesRecordInsertListadd
(S)ClassesLedgerTrialBalanceDPpopulateTmpTransDetail – line 100
(S)ClassesLedgerTrialBalanceDPprocessReportDetail – line 28
(S)ClassesLedgerTrialBalanceDPprocessReport – line 32
(S)ClassesSrsReportRunRdpPreProcessServiceexecuteWithContract – line 102
(S)ClassesSrsReportRunRdpPreProcessServiceexecuteRDLClasses – line 38
(C)ClassesSrsReportRunServicepreRunReport – line 26
(C)ClassesSrsReportRunImplpreRunReport – line 12
(C)ClassesSrsReportRunController unReport – line 42
(C)ClassesSrsReportRunController un
(C)ClassesSysOperationControllerstartOperation – line 10
(C)ClassesSrsReportRunControllerstartOperation
(C)ClassesLedgerTrialBalanceControllermain – line 9
I was using MS Dynamics AX 2012 R2
SOLUTION:
Need to change the RecordInsertList initialization:
ClassesLedgerTrialBalanceDPpopulateTmpTransDetail, Line 64:
Original line:
recordInsertList = new RecordInsertList(tableNum(LedgerTrialBalanceTmp), true, true, true, true, true, _ledgerTrialBalanceStagingTmp);
Change to:
recordInsertList = new RecordInsertList(tableNum(LedgerTrialBalanceStagingTmp), true, true, true, true, true, _ledgerTrialBalanceStagingTmp);
Compile forward, generate incremental CIL, and it’s done.
