carry out action message error

knelson997
Member Posts: 2
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?
"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
-
Run table Production Document Dimension and see if there is actually a record.
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.0 -
I'm looking at the same error, and I've managed to run it down to a specific area in CodeUnit 99000813, "Carry Out Action".
In the "InsertProdOrderLine" subroutine, it inserts a new record into the "Production Order Line" tableProdOrderLine.INIT; ProdOrderLine.BlockDynamicTracking(TRUE); ProdOrderLine.Status := ProdOrder.Status; ProdOrderLine."Prod. Order No." := ProdOrder."No."; ProdOrderLine."Line No." := NextLineNo; ProdOrderLine.VALIDATE("Item No.",ReqLine."No."); ProdOrderLine.VALIDATE("Unit of Measure Code",ReqLine."Unit of Measure Code"); ProdOrderLine."Production BOM Version Code" := ReqLine."Production BOM Version Code"; ProdOrderLine."Routing Version Code" := ReqLine."Routing Version Code"; ProdOrderLine."Routing Type" := ReqLine."Routing Type"; ProdOrderLine."Routing Reference No." := ProdOrderLine."Line No."; ProdOrderLine.Description := ReqLine.Description; ProdOrderLine."Description 2" := ReqLine."Description 2"; ProdOrderLine."Variant Code" := ReqLine."Variant Code"; ProdOrderLine."Location Code" := ReqLine."Location Code"; ProdOrderLine."Bin Code" := ReqLine."Bin Code"; ProdOrderLine."Scrap %" := ReqLine."Scrap %"; ProdOrderLine."Production BOM No." := ReqLine."Production BOM No."; ProdOrderLine."Inventory Posting Group" := Item."Inventory Posting Group"; ProdOrderLine.VALIDATE("Unit Cost",ReqLine."Unit Cost"); ProdOrderLine."Routing No." := ReqLine."Routing No."; ProdOrderLine."Starting Time" := ReqLine."Starting Time"; ProdOrderLine."Starting Date" := ReqLine."Starting Date"; ProdOrderLine."Ending Time" := ReqLine."Ending Time"; ProdOrderLine."Ending Date" := ReqLine."Ending Date"; ProdOrderLine."Due Date" := ReqLine."Due Date"; ProdOrderLine.Status := ProdOrder.Status; ProdOrderLine."Planning Level Code" := ReqLine."Planning Level"; ProdOrderLine."Indirect Cost %" := ReqLine."Indirect Cost %"; ProdOrderLine."Overhead Rate" := ReqLine."Overhead Rate"; ProdOrderLine.VALIDATE(Quantity,ReqLine.Quantity); IF NOT (ProdOrder.Status = ProdOrder.Status::Planned) THEN ProdOrderLine."Planning Flexibility" := ReqLine."Planning Flexibility"; ProdOrderLine.UpdateDatetime; ProdOrderLine."Shortcut Dimension 1 Code" := ReqLine."Shortcut Dimension 1 Code"; ProdOrderLine."Shortcut Dimension 2 Code" := ReqLine."Shortcut Dimension 2 Code"; ProdOrderLine.INSERT;
Immediately following that block, it inserts the dimension values from the planning worksheet into table 358, "Production Document Dimension"FromJnlLineDim.SETRANGE("Table ID",DATABASE::"Requisition Line"); FromJnlLineDim.SETRANGE("Journal Template Name",ReqLine."Worksheet Template Name"); FromJnlLineDim.SETRANGE("Journal Batch Name",ReqLine."Journal Batch Name"); FromJnlLineDim.SETRANGE("Journal Line No.",ReqLine."Line No."); FromJnlLineDim.SETRANGE("Allocation Line No.",0); DimMgt.MoveJnlLineDimToProdDocDim( FromJnlLineDim,DATABASE::"Prod. Order Line", ProdOrder.Status,ProdOrder."No.", ProdOrderLine."Line No.",0);
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.OnInsert() IF Status = Status::Finished THEN ERROR(Text000,Status,TABLECAPTION); ReserveProdOrderLine.VerifyQuantity(Rec,xRec); DimMgt.InsertProdDocDim( DATABASE::"Prod. Order Line",Status,"Prod. Order No.","Line No.",0, "Shortcut Dimension 1 Code","Shortcut Dimension 2 Code"); IF "Routing Reference No." < 0 THEN "Routing Reference No." := "Line No.";
Why would they try to write the same records twice in a row? Is this a bug0 -
The Oninsert Trigger is not called.
ProdOrderLine.INSERT;
The code looks good to me.0 -
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.0 -
Have you done any changes to production order line table?
If not I would just comment out this and let MS know. I'm guessing you are on 5.0DimMgt.MoveJnlLineDimToProdDocDim( FromJnlLineDim,DATABASE::"Prod. Order Line", ProdOrder.Status,ProdOrder."No.", ProdOrderLine."Line No.",0);
0 -
just FYI - found the issue.
it has been confirmed that this is an issue by MS. It is available on customersource under hotfixes.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions