I am setting up test data for a new implementation in NAV5.0 In attempting to create a firm planned production order from the planning worksheet, I get the follow error.
"The Production Document Dimension Already Exists."
There are as yet no firm planned production orders in the database.
This could be a setup problem, since this is a new implementation, but I can't figure it out. Has anybody seen this before?
0
Comments
If it is, then the person who cleaned up the db missed this table. if there isn't any record that error mentions, then it's a bug and a developer needs to look at it.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
In the "InsertProdOrderLine" subroutine, it inserts a new record into the "Production Order Line" table
Immediately following that block, it inserts the dimension values from the planning worksheet into table 358, "Production Document Dimension"
The Problem is that the code in the OnInsert trigger is also writing these values to the Prod. Document Dimension table, with the exact same values.
Why would they try to write the same records twice in a row? Is this a bug
The code looks good to me.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
When I run this in debug and break prior to the call to INSERT, no records are in the Production Document Dimensions table for the production order lines (two records exist for the header, because they were written in the InsertProdOrder function, which calls InsertProdOrderLines). When I break after the insert on Production Order lines, and review the contents of this table, the records ARE there. If I F8 to step through from that point, the call to the Dimension Management codeunit breaks when it tries to write the records, because the records were already there. I have even commented out the call to Dimension Management from InsertProdOrderLines, and have verified that the records for the lines exist after the transaction completes.
The call to INSERT() is writing the records to the Production Document Dimensions table. I realize that the "RunTrigger" parameter to INSERT is optional, and that the default is FALSE. This is what is making me think that there is a bug.
If not I would just comment out this and let MS know. I'm guessing you are on 5.0
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
it has been confirmed that this is an issue by MS. It is available on customersource under hotfixes.