Err posting invoice : cannot create dimension history (InventReportDimHistory)

Dear All,

Hai everyone, i want to ask about this kind of err message :

Cannot create record in Dimension history for documents (InventReportDimHistory). Type: None. The record already exists.

I encountered this when posting invoice for PO.

After i analized the pattern, i knew that :

  • Product type : service with no varians (not product master)

  • Partial invoiced from the same receipt Id

  • The second invoiced from partial invoice will trigger this error

Have anyone encountered this before? Is it a bug?

FYI, i have search about this kind of error. From the information, i knew that this error also happen in AX 4.0 and AX 2009.

Hendrianto

Its not a bug, seems not fulfilling the unique index property so the error message arises: ‘The record already exists.’

Just check the table ‘InventReportDimHistory’ there transrefid field isnot getting populated with correct number, so assign the number sequence correctly.

Hi Vishal!

Thx for your reply…

I have checked the table and my numbering sequence.

The last number in table is *568

The next number in numbering sequence is *569

There is no status list/pending number nin numbering sequence too

Btw, i aggree with your opinion. It is not bug.

I have check it in other environment and it goes well.

I wonder where is it goes wrong?

You have to check ‘TransRefId’ field, in your table i can observe it is POC- ######. just check its number sequence.

Dear Vishal,

Thx a lot! You helped me solved this issue.

This table (InventreportDimHistory) check unique of fields : InventDimId, InventTransId, TransactionLogType, and TransRefId.

When this all 4 field have same value with other record, it trigger the error message.

In my case, i set wrong numbering sequence for TransRefId.

Hahaha dumb me!

Thanks again Vishal!

Hendrianto

If someone encountering the same case like me,

Please check numbering sequence in AP Parameter - Internal invoice and Invoice voucher

Internal Invoice → numbering for TransRefId that i posted before

Invoice Voucher → numbeirng for PO Invoice