Codeunit 5407 "Prod. Order Status Management"
Base Application · Microsoft.Manufacturing.Document
Across versions
- BC23present
- BC241 events added
- BC251 events added
- BC2630 procedures added, 5 events added
- BC273 events added, 2 procedures added
- BC282 events added, 1 procedures changed
- BC291 procedures changed, 1 procedures added
- BC30declaration changed
Neighbourhood 28 connected objects and pages
Base Application · Microsoft.Manufacturing.Document · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| TableNo | Production Order |
| Permissions | TableData “Source Code Setup” = r, TableData Item = m, TableData “Production Order” = rimd, TableData “Prod. Order Capacity Need” = rid, TableData “Inventory Adjmt. Entry (Order)” = rim |
Events published
OnAfterInitItemJnlLineFromProdOrderComp(var ItemJournalLine: Record "Item Journal Line"; ProductionOrder: Record "Production Order"; ProdOrderLine: Record "Prod. Order Line"; ProdOrderComponent: Record "Prod. Order Component")(integration)OnAfterInitItemJnlLineFromProdOrderLine(var ItemJournalLine: Record "Item Journal Line"; ProductionOrder: Record "Production Order"; ProdOrderLine: Record "Prod. Order Line"; ProdOrderRoutingLine: Record "Prod. Order Routing Line")(integration)OnAfterInsertProdOrderLine(var ToProdOrderLine: Record "Prod. Order Line"; FromProdOrderLine: Record "Prod. Order Line")(integration)OnAfterSetTimeAndQuantityOmItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; ProdOrderRoutingLine: Record "Prod. Order Routing Line"; OutputQtyBase: Decimal; OutputQty: Decimal)(integration)OnAfterExcludePostedSetupTimeForReopenedProdOrder(var ItemJournalLine: Record "Item Journal Line"; ProdOrderRoutingLine: Record "Prod. Order Routing Line"; OutputQtyBase: Decimal; OutputQty: Decimal)+ BC29 (integration)OnAfterTransProdOrder(var FromProdOrder: Record "Production Order"; var ToProdOrder: Record "Production Order")(integration)- subscribers: Codeunit 99000783 “Prod. Document Attachment Mgt.” DocumentAttachmentFlow_FromProdOrderToProdOrder
OnAfterTransProdOrderLines(var FromProdOrder: Record "Production Order"; var ToProdOrder: Record "Production Order")(integration)OnAfterTransProdOrderComp(var FromProdOrder: Record "Production Order"; var ToProdOrder: Record "Production Order")(integration)OnAfterToProdOrderLineModify(var ToProdOrderLine: Record "Prod. Order Line"; var FromProdOrderLine: Record "Prod. Order Line"; var NewStatus: Option Quote,Planned,"Firm Planned",Released,Finished)(integration)- subscribers: Codeunit 20407 “Qlty. Manufactur. Integration” HandleOnAfterToProdOrderLineModify, Codeunit 99000783 “Prod. Document Attachment Mgt.” DocumentAttachmentFlow_FromProdOrderLineToProdOrderLine
OnAfterToProdOrderRtngLineInsert(var ToProdOrderRoutingLine: Record "Prod. Order Routing Line"; var FromProdOrderRoutingLine: Record "Prod. Order Routing Line")(integration)- subscribers: Codeunit 20407 “Qlty. Manufactur. Integration” HandleOnAfterToProdOrderRtngLineInsert, Codeunit 20520 “Subc. Prod. Order Rtng. Ext.” TransferSubcontractingCommentsOnAfterToProdOrderRoutingLineInsert
OnAfterCalculateQtyToPost(ProdOrderComponent: Record "Prod. Order Component"; var QtyToPost: Decimal; ProdOrder: Record "Production Order"; NewStatus: Enum "Production Order Status")(integration)OnAfterChangeStatusOnProdOrder(var ProdOrder: Record "Production Order"; var ToProdOrder: Record "Production Order"; NewStatus: Enum "Production Order Status"; NewPostingDate: Date; NewUpdateUnitCost: Boolean; var SuppressCommit: Boolean; xProductionOrder: Record "Production Order")+ BC28 − BC28 (integration)- subscribers: Codeunit 20407 “Qlty. Manufactur. Integration” HandleOnAfterChangeStatusOnProdOrder, Codeunit 20549 “Subc. Change Prod.Order Status” UpdateWIPLedgerEntryProdOrderRelationOnAfterChangeStatus
OnAfterUpdateGlobalDim(var ItemJournalLine: Record "Item Journal Line"; ProdOrderRoutingLine: Record "Prod. Order Routing Line"; ProdOrderLine: Record "Prod. Order Line")(integration)OnBeforeChangeStatusOnProdOrder(var ProductionOrder: Record "Production Order"; NewStatus: Option Quote,Planned,"Firm Planned",Released,Finished; var IsHandled: Boolean; NewPostingDate: Date; NewUpdateUnitCost: Boolean)(integration)- subscribers: Codeunit 20549 “Subc. Change Prod.Order Status” CheckForOpenTransferOrdersOnBeforeChangeStatusOnProdOrder
OnBeforeCheckBeforeFinishProdOrder(var ProductionOrder: Record "Production Order"; var IsHandled: Boolean)(integration)OnBeforeOnRun(var ChangeStatusOnProdOrderPage: Page "Change Status on Prod. Order"; var ProductionOrder: Record "Production Order"; var IsHandled: Boolean; NewStatus: Enum "Production Order Status"; NewPostingDate: Date; NewUpdateUnitCost: Boolean)(integration)OnBeforeFlushProdOrder(var ProductionOrder: Record "Production Order"; NewStatus: Enum "Production Order Status"; PostingDate: Date; var IsHandled: Boolean)(integration)OnBeforeInsertProdOrderLine(var ToProdOrderLine: Record "Prod. Order Line"; FromProdOrderLine: Record "Prod. Order Line")(integration)OnBeforeMakeMultiLevelAdjmt(var ProductionOrder: Record "Production Order"; var IsHandled: Boolean)(integration)OnBeforePostFlushItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)(integration)OnBeforeTransProdOrderRtngCmtLn(FromProductionOrder: Record "Production Order"; ToProductionOrder: Record "Production Order"; var IsHandled: Boolean)(integration)OnBeforeTransProdOrderCmtLine(FromProductionOrder: Record "Production Order"; ToProductionOrder: Record "Production Order"; var IsHandled: Boolean)(integration)OnBeforeTransProdOrderBOMCmtLine(FromProductionOrder: Record "Production Order"; ToProductionOrder: Record "Production Order"; var IsHandled: Boolean)(integration)OnBeforeTransferLinks(FromProdOrder: Record "Production Order"; ToProdOrder: Record "Production Order"; var IsHandled: Boolean)(integration)OnBeforeRoundQtyToPost(ProdOrderComponent: Record "Prod. Order Component"; var QtyToPost: Decimal; var IsHandled: Boolean)(integration)OnBeforeMatrOrCapConsumpExists(ProdOrderLine: Record "Prod. Order Line"; var EntriesExist: Boolean; var IsHandled: Boolean)(integration)OnChangeProdOrderStatusOnBeforeTransProdOrder(var ProdOrder: Record "Production Order"; NewStatus: Enum "Production Order Status")(integration)OnCheckMissingConsumption(var ProductionOrder: Record "Production Order"; var ProdOrderLine: Record "Prod. Order Line"; var ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var ShowWarning: Boolean)(integration)OnCheckMissingOutput(var ProductionOrder: Record "Production Order"; var ProdOrderLine: Record "Prod. Order Line"; var ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var ShowWarning: Boolean)(integration)OnCheckBeforeFinishProdOrderOnAfterSetProdOrderCompFilters(var ProdOrderComp: Record "Prod. Order Component"; ProductionOrder: Record "Production Order"; var PurchaseLine: Record "Purchase Line")(integration)OnCheckBeforeFinishProdOrderOnAfterCheckProdOrder(var ProdOrder: Record "Production Order")(integration)OnCopyFromProdOrder(var ToProdOrder: Record "Production Order"; FromProdOrder: Record "Production Order")(integration)OnCopyFromProdOrderLine(var ToProdOrderLine: Record "Prod. Order Line"; FromProdOrderLine: Record "Prod. Order Line")(integration)OnCopyFromProdOrderRoutingLine(var ToProdOrderRoutingLine: Record "Prod. Order Routing Line"; FromProdOrderRoutingLine: Record "Prod. Order Routing Line"; NewPostingDate: Date)(integration)OnCopyFromProdOrderComp(var ToProdOrderComp: Record "Prod. Order Component"; var FromProdOrderComp: Record "Prod. Order Component")(integration)OnCopyFromProdOrderCapacityNeed(var ToProdOrderCapacityNeed: Record "Prod. Order Capacity Need"; FromProdOrderCapacityNeed: Record "Prod. Order Capacity Need")(integration)OnFlushProdOrderOnAfterFindProdOrderRtngLine(var ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var IsLastOperation: Boolean)(integration)OnFlushProdOrderOnAfterPostFlushItemJnlLine(var ItemJnlLine: Record "Item Journal Line")(integration)OnFlushProdOrderOnAfterProdOrderCompSetFilters(ProdOrder: Record "Production Order"; var ProdOrderComponent: Record "Prod. Order Component")(integration)OnFlushProdOrderOnAfterProdOrderLineLoopIteration(var ProdOrderLine: Record "Prod. Order Line"; NewStatus: Enum "Production Order Status"; PostingDate: Date)(integration)OnFlushProdOrderOnBeforeCopyItemTracking(var ItemJournalLine: Record "Item Journal Line"; ProdOrderComponent: Record "Prod. Order Component"; Item: Record Item)(integration)OnFlushProdOrderProcessProdOrderRtngLineOnAfterCalcOutputQty(ProdOrderLine: Record "Prod. Order Line"; ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var OutputQty: Decimal; var OutputQtyBase: Decimal)(integration)OnBeforeFlushProdOrderProcessProdOrderRtngLine(var ProdOrderLine: Record "Prod. Order Line"; var ProdOrderRoutingLine: Record "Prod. Order Routing Line"; PostingDate: Date; var IsHandled: Boolean)(integration)OnInitItemJnlLineFromProdOrderCompOnAfterInit(var ItemJournalLine: Record "Item Journal Line")(integration)OnInitItemJnlLineFromProdOrderLineOnAfterInit(var ItemJournalLine: Record "Item Journal Line")(integration)OnTransProdOrderCompOnAfterToProdOrderCompInsert(var FromProdOrderComp: Record "Prod. Order Component"; var ToProdOrderComp: Record "Prod. Order Component")(integration)OnTransProdOrderCompOnBeforeToProdOrderCompInsert(var FromProdOrderComp: Record "Prod. Order Component"; var ToProdOrderComp: Record "Prod. Order Component")(integration)OnTransProdOrderLineOnBeforeFinishedInvtAdjmtEntryOrderModify(var InventoryAdjmtEntryOrder: Record "Inventory Adjmt. Entry (Order)"; FromProdOrderLine: Record "Prod. Order Line"; var ToProdOrderLine: Record "Prod. Order Line"; ToProductionOrder: Record "Production Order")(integration)OnTransProdOrderLineOnBeforeTransferPOLineToPOLine(FromProdOrderLine: Record "Prod. Order Line"; var ToProdOrderLine: Record "Prod. Order Line"; NewStatus: Enum "Production Order Status")(integration)OnTransProdOrderCapNeedOnBeforeDeleteAll(var ProdOrder: Record "Production Order"; var ProdOrderCapacityNeed: Record "Prod. Order Capacity Need"; var IsHandled: Boolean)(integration)OnAfterSetProdOrderCompFilters(var ProdOrderComponent: Record "Prod. Order Component"; ProductionOrder: Record "Production Order")(integration)OnErrorIfUnableToClearWIPOnBeforeError(ProdOrderLine: Record "Prod. Order Line"; var IsHandled: Boolean)(integration)OnRunOnAfterChangeStatusFormRun(var ProductionOrder: Record "Production Order"; var ChangeStatusOnProdOrder: Page "Change Status on Prod. Order")+ BC27 − BC27 (integration)- subscribers: Codeunit 20549 “Subc. Change Prod.Order Status” ChangeProdOrderStatusOnRunOnAfterChangeStatusFormRun
OnTransProdOrderOnBeforeToProdOrderInsert(var ToProdOrder: Record "Production Order"; FromProdOrder: Record "Production Order"; NewPostingDate: Date)(integration)OnBeforeShowStatusMessage(ProdOrder: Record "Production Order"; ToProdOrder: Record "Production Order"; var IsHandled: Boolean)(integration)OnTransProdOrderLineOnAfterDeleteReservEntries(FromProdOrderLine: Record "Prod. Order Line"; var ToProdOrderLine: Record "Prod. Order Line"; var NewStatus: Enum "Production Order Status")(integration)OnTransProdOrderOnAfterStatusIsReleased(var ToProdOrder: Record "Production Order"; FromProdOrder: Record "Production Order")(integration)OnBeforeTransProdOrder(var FromProdOrder: Record "Production Order"; Status: Enum "Production Order Status")(integration)OnTransProdOrderLineOnBeforeFromProdOrderLineLoop(FromProdOrderLine: Record "Prod. Order Line"; var ToProdOrderLine: Record "Prod. Order Line"; NewStatus: Enum "Production Order Status"; var IsHandled: Boolean; ToProductionOrder: Record "Production Order")(integration)OnTransProdOrderLineOnAfterFromProdOrderLineFindSet(FromProdOrderLine: Record "Prod. Order Line"; var ToProdOrderLine: Record "Prod. Order Line"; NewStatus: Enum "Production Order Status")(integration)OnChangeProdOrderStatusOnBeforeDeleteDocReservation(ProdOrder: Record "Production Order"; var IsHandled: Boolean)(integration)OnAfterFlushProdOrderProcessProdOrderRtngLine(ProdOrder: Record "Production Order"; ProdOrderLine: Record "Prod. Order Line"; ProdOrderRtngLine: Record "Prod. Order Routing Line"; NewStatus: Option Simulated,Planned,"Firm Planned",Released,Finished; PostingDate: Date)(integration)OnAfterRoundQtyToPost(ProdOrderComp: Record "Prod. Order Component"; QtyToPost: Decimal)(integration)OnCheckBeforeFinishProdOrderOnBeforeFindSet(var ProdOrderLine: Record "Prod. Order Line"; var ProdOrderRtngLine: Record "Prod. Order Routing Line"; var ShowWarning: Boolean; var IsHandled: Boolean)(integration)OnTransferLinksOnBeforeCopyLinks(var FromProductionOrder: Record "Production Order"; var ToProductionOrder: Record "Production Order"; var IsHandled: Boolean)(integration)OnTransProdOrderLineOnAfterFromProdOrderLineSetFilters(var FromProdOrderLine: Record "Prod. Order Line"; var FromProductionOrder: Record "Production Order"; NewUpdateUnitCost: Boolean)+ BC24 (integration)OnBeforeTransProdOrderComp(FromProdOrder: Record "Production Order"; var ToProdOrder: Record "Production Order"; var IsHandled: Boolean)+ BC25 (integration)OnErrorIfUnableToClearWIPOnAfterProdOrderLineSetFilters(ProductionOrder: Record "Production Order"; var ProdOrderLine: Record "Prod. Order Line")+ BC26 (integration)OnAfterTransferReopenProdOrderLine(ProdOrderLine: Record "Prod. Order Line"; FromProdOrderLine: Record "Prod. Order Line")+ BC26 (integration)- subscribers: Codeunit 99000783 “Prod. Document Attachment Mgt.” DocumentAttachmentFlow_FromFinishedToReopenedProdOrderLine
OnAfterTransferRelatedTablesToReleasedProdOrder(ProductionOrder: Record "Production Order")+ BC26 (integration)- subscribers: Codeunit 20549 “Subc. Change Prod.Order Status” ReopenWIPEntriesOnAfterTransferRelatedTablesToReleasedProdOrder
OnProcessProdOrderLineForReopenOnBeforeDeleteUpdateProdOrderLine(ProdOrderLine: Record "Prod. Order Line")+ BC26 (integration)OnAfterTransferReopenProdOrder(ProductionOrder: Record "Production Order"; FromProductionOrder: Record "Production Order")+ BC26 (integration)- subscribers: Codeunit 99000783 “Prod. Document Attachment Mgt.” DocumentAttachmentFlow_FromFinishedToReopenedProdOrder
OnTransReopenProdOrderCompOnAfterInsert(FromProdOrderComponent: Record "Prod. Order Component"; NewProdOrderComponent: Record "Prod. Order Component")+ BC27 (integration)OnTransferReopenProdOrderRtngLineOnAfterInsert(FromProdOrderRoutingLine: Record "Prod. Order Routing Line"; ToProdOrderRoutingLine: Record "Prod. Order Routing Line"; FromProductionOrder: Record "Production Order")+ BC27 (integration)OnBeforeShowReleasedProdOrderDocument(var ProductionOrder: Record "Production Order"; var IsHandled: Boolean)+ BC28 (integration)
Procedures
ChangeProdOrderStatus(ProdOrder: Record "Production Order"; NewStatus: Enum "Production Order Status"; NewPostingDate: Date; NewUpdateUnitCost: Boolean)ReopenFinishedProdOrder(var ProdOrder: Record "Production Order")+ BC26ProcessProdOrderForReopen(var ProdOrder: Record "Production Order")+ BC26 Δ BC29SetFinishOrderWithoutOutput(NewFinishOrderWithoutOutput: Boolean)+ BC26TransProdOrder(var FromProdOrder: Record "Production Order")FlushProdOrder(ProdOrder: Record "Production Order"; NewStatus: Enum "Production Order Status"; PostingDate: Date)CheckBeforeFinishProdOrder(ProdOrder: Record "Production Order")Δ BC28SetPostingInfo(Status: Enum "Production Order Status"; PostingDate: Date; UpdateUnitCost: Boolean)OutputExists(ProdOrderLine: Record "Prod. Order Line"): BooleanMatrOrCapConsumpExists(ProdOrderLine: Record "Prod. Order Line"): BooleanSetTimeAndQuantityOmItemJnlLine(var ItemJnlLine: Record "Item Journal Line"; ProdOrderRtngLine: Record "Prod. Order Routing Line"; OutputQtyBase: Decimal; OutputQty: Decimal; PutawayQtyBaseToCalc: Decimal)ChangeProdOrderStatus(ProdOrder: Record "Production Order"; var NewProdOrder: Record "Production Order"; NewStatus: Enum "Production Order Status"; NewPostingDate: Date; NewUpdateUnitCost: Boolean)ChangeStatusWithSelectionFilter(var ProductionOrder: Record "Production Order")+ BC26
Plus 55 local procedures.
Triggers
OnRun
Relations
- runs on Table 5405 “Production Order”
Calls
From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.
- Codeunit 99000758 “Mfg. Cost Calculation Mgt.” (5 calls:
FlushProdOrderProcessProdOrderRtngLine → CalcActOperOutputAndScrap,FlushProdOrderProcessProdOrderRtngLine → CalcActualOutputQtyWithNoCapacity,GetOutputQtyForProdOrderRoutingLine → CalcActOutputQtyBase, …) - Codeunit 99000845 “Reservation Management” (5 calls:
ChangeProdOrderStatus → DeleteDocumentReservation,TransProdOrderComp → DeleteReservEntries,TransProdOrderComp → SetReservSource, …) - Codeunit 5802 “Inventory Posting To G/L” (4 calls:
PostInvtBuffer → AdjustPostedWIPForProduction,PostInvtBuffer → PostInvtPostBufPerEntry,PostInvtBuffer → SetGenJnlBatch, …) - Codeunit 5402 “Unit of Measure Management” (3 calls:
InitItemJnlLineFromProdOrderComp → QtyRndPrecision,RoundQtyToPost → RoundToItemRndPrecision,SetTimeAndQuantityOmItemJnlLine → TimeRndPrecision) - Codeunit 27 “Confirm Management” (2 calls:
CanReopenFinishedProdOrder → GetResponseOrDefault,CheckBeforeSetStatusToFinishProdOrder → GetResponseOrDefault) - Codeunit 5774 “Whse.-Production Release” (2 calls:
ChangeProdOrderStatus → FinishedDelete,ChangeProdOrderStatus → Release) - Codeunit 700 “Page Management” (2 calls:
TransferLinks → GetPageCaption,TransferLinks → GetPageID) - Codeunit 8703 “Feature Telemetry” (2 calls:
ReopenFinishedProdOrder → LogUptake,ReopenFinishedProdOrder → LogUsage) - Codeunit 99000750 “ProdOrderChangeStatusBulk” (2 calls:
ChangeStatusWithSelectionFilter → (object),ChangeStatusWithSelectionFilter → SetParameters) - Codeunit 99000837 “Prod. Order Line-Reserve” (2 calls:
FlushProdOrderProcessProdOrderRtngLine → TransferPOLineToItemJnlLine,TransProdOrderLine → TransferPOLineToPOLine) - Codeunit 99000893 “Mfg. Create Put-away” (2 calls:
HandleWhsePutAwayForProdOutput → CreateWhsePutAwayForProdOrderOutputLine,HandleWhsePutAwayForProdOutput → ShouldCreateWhsePutAwayForProdOutput) - Codeunit 22 “Item Jnl.-Post Line” (1 call:
PostFlushItemJnlLine → RunWithCheck) - Codeunit 408 “DimensionManagement” (1 call:
FlushProdOrderProcessProdOrderRtngLine → UpdateGlobalDimFromDimSetID) - Codeunit 5837 “Additional-Currency Management” (1 call:
TransProdOrderLine → CalcACYAmt) - Codeunit 5894 “Inventory Adjustment Handler” (1 call:
MakeMultiLevelAdjmt → MakeAutomaticInventoryAdjustment) - Codeunit 6500 “Item Tracking Management” (1 call:
FlushProdOrder → CopyItemTracking) - Codeunit 7325 “Whse.-Output Prod. Release” (1 call:
ChangeProdOrderStatus → FinishedDelete) - Codeunit 99000755 “Shop Calendar Management” (1 call:
SetTimeAndQuantityOmItemJnlLine → QtyperTimeUnitofMeasure) - Codeunit 99000757 “Update Prod. Order Cost” (1 call:
TransProdOrderLine → UpdateUnitCostOnProdOrder) - Codeunit 99000838 “Prod. Order Comp.-Reserve” (1 call:
TransProdOrderComp → TransferPOCompToPOComp) - Page 700 “Error Messages” (1 call:
ChangeStatusWithSelectionFilter → (object)) - Page 99000831 “Released Production Order” (1 call:
ShowReleasedProdOrderDocument → (object))
Called by
- Codeunit 99000750 “ProdOrderChangeStatusBulk” (2 calls:
OnRun → ChangeProdOrderStatus,OnRun → SetFinishOrderWithoutOutput) - Codeunit 99000792 “Create Prod. Order from Sale” (1 call:
CreateProductionOrder → FlushProdOrder)
Recent changes
- 2026-09-02 #10879 [Main]Reopening and re-finishing production order reposts backward-flushed routing capacityInitial commit (main, BC30, fix)
- 2026-08-30 #10546 [Main] Reopening and re-finishing production order reposts backward-flushed routing capacityupdate (main, BC30, fix)
Ask your agent
Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "Prod. Order Status Management"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.