Dynamics ax 2012 Trial Balance Detail Report Error “The field with ID ‘0’ does not exist in table ‘LedgerTrialBalanceStagingTmp'”

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:
\Classes\LedgerTrialBalanceDP\populateTmpTransDetail, 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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: