---
title: "Codeunit 5407 Prod. Order Status Management"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/5407-prod-order-status-management/
type: codeunit
id: 5407
name: "Prod. Order Status Management"
app: "Base Application"
namespace: Microsoft.Manufacturing.Document
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/5407-prod-order-status-management/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 5407 Prod. Order Status Management

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/5407-prod-order-status-management/

| | |
| --- | --- |
| App | Base Application |
| Namespace | Microsoft.Manufacturing.Document |
| Versions | 17-28 |
| Source file | Manufacturing/Document/ProdOrderStatusManagement.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| ChangeStatusOnProdOrder | (Record Production Order, Option, Date, Boolean) | - | public | 17-19 | Pending 17.0 | Replaced by ChangeProdOrderStatus with enum parameter NewStatus. |
| ChangeProdOrderStatus | (Record Production Order, Enum Production Order Status, Date, Boolean) | - | public | 17-28 | - | - |
| FlushProdOrder | (Record Production Order, Enum Production Order Status, Date) | - | public | 17-28 | - | - |
| SetPostingInfo | (Option, Date, Boolean) | - | public | 17-19 | Pending 17.0 | Replaced by same with enum parameter NewStatus. |
| SetPostingInfo | (Enum Production Order Status, Date, Boolean) | - | public | 17-28 | - | - |
| TransProdOrder | (var Record Production Order) | - | public | 20-28 | - | - |
| OutputExists | (Record Prod. Order Line) | Boolean | public | 21-28 | - | - |
| MatrOrCapConsumpExists | (Record Prod. Order Line) | Boolean | public | 21-28 | - | - |
| SetTimeAndQuantityOmItemJnlLine | (var Record Item Journal Line, Record Prod. Order Routing Line, Decimal, Decimal, Decimal) | - | public | 21-28 | - | - |
| ChangeProdOrderStatus | (Record Production Order, var Record Production Order, Enum Production Order Status, Date, Boolean) | - | public | 21-28 | - | - |
| ReopenFinishedProdOrder | (var Record Production Order) | - | public | 26-28 | - | - |
| SetFinishOrderWithoutOutput | (Boolean) | - | public | 26-28 | - | - |
| ChangeStatusWithSelectionFilter | (var Record Production Order) | - | public | 26-28 | - | - |
| CheckBeforeFinishProdOrder | (Record Production Order) | - | public | 28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterInitItemJnlLineFromProdOrderComp | (var Record Item Journal Line, Record Production Order, Record Prod. Order Line, Record Prod. Order Component) | 17-28 | - | - |
| Integration event | OnAfterInitItemJnlLineFromProdOrderLine | (var Record Item Journal Line, Record Production Order, Record Prod. Order Line, Record Prod. Order Routing Line) | 17-28 | - | - |
| Integration event | OnAfterInsertProdOrderLine | (var Record Prod. Order Line, Record Prod. Order Line) | 17-28 | - | - |
| Integration event | OnAfterSetTimeAndQuantityOmItemJnlLine | (var Record Item Journal Line, Record Prod. Order Routing Line) | 17-18 | - | - |
| Integration event | OnAfterTransProdOrder | (var Record Production Order, var Record Production Order) | 17-28 | - | - |
| Integration event | OnAfterTransProdOrderLines | (var Record Production Order, var Record Production Order) | 17-28 | - | - |
| Integration event | OnAfterTransProdOrderComp | (var Record Production Order, var Record Production Order) | 17-28 | - | - |
| Integration event | OnAfterToProdOrderLineModify | (var Record Prod. Order Line, var Record Prod. Order Line, var Option) | 17-28 | - | - |
| Integration event | OnAfterToProdOrderRtngLineInsert | (var Record Prod. Order Routing Line, var Record Prod. Order Routing Line) | 17-28 | - | - |
| Integration event | OnAfterCalculateQtyToPost | (Record Prod. Order Component, var Decimal) | 17-18 | - | - |
| Integration event | OnAfterChangeStatusOnProdOrder | (var Record Production Order, var Record Production Order, Enum Production Order Status, Date, Boolean) | 17 | - | - |
| Integration event | OnAfterUpdateGlobalDim | (var Record Item Journal Line, Record Prod. Order Routing Line, Record Prod. Order Line) | 17-28 | - | - |
| Integration event | OnBeforeChangeStatusOnProdOrder | (var Record Production Order, Option) | 17 | - | - |
| Integration event | OnBeforeCheckBeforeFinishProdOrder | (var Record Production Order, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeInsertProdOrderLine | (var Record Prod. Order Line, Record Prod. Order Line) | 17-28 | - | - |
| Integration event | OnBeforeMakeMultiLevelAdjmt | (var Record Production Order, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforePostFlushItemJnlLine | (var Record Item Journal Line, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeRoundQtyToPost | (Record Prod. Order Component, var Decimal, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeMatrOrCapConsumpExists | (Record Prod. Order Line, var Boolean, var Boolean) | 17-28 | - | - |
| Integration event | OnCheckMissingConsumption | (var Record Production Order, var Record Prod. Order Line, var Record Prod. Order Routing Line, var Boolean) | 17-28 | - | - |
| Integration event | OnCheckMissingOutput | (var Record Production Order, var Record Prod. Order Line, var Record Prod. Order Routing Line, var Boolean) | 17-28 | - | - |
| Integration event | OnCheckBeforeFinishProdOrderOnAfterSetProdOrderCompFilters | (var Record Prod. Order Component) | 17-19 | - | - |
| Integration event | OnCopyFromProdOrder | (var Record Production Order, Record Production Order) | 17-28 | - | - |
| Integration event | OnCopyFromProdOrderLine | (var Record Prod. Order Line, Record Prod. Order Line) | 17-28 | - | - |
| Integration event | OnCopyFromProdOrderRoutingLine | (var Record Prod. Order Routing Line, Record Prod. Order Routing Line) | 17-18 | - | - |
| Integration event | OnCopyFromProdOrderComp | (var Record Prod. Order Component, var Record Prod. Order Component) | 17-28 | - | - |
| Integration event | OnCopyFromProdOrderCapacityNeed | (var Record Prod. Order Capacity Need, Record Prod. Order Capacity Need) | 17-28 | - | - |
| Integration event | OnFlushProdOrderOnAfterFindProdOrderRtngLine | (var Record Prod. Order Routing Line, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeFlushProdOrderProcessProdOrderRtngLine | (var Record Prod. Order Line, var Record Prod. Order Routing Line, Date, var Boolean) | 17-28 | - | - |
| Integration event | OnInitItemJnlLineFromProdOrderCompOnAfterInit | (var Record Item Journal Line) | 17-28 | - | - |
| Integration event | OnInitItemJnlLineFromProdOrderLineOnAfterInit | (var Record Item Journal Line) | 17-28 | - | - |
| Integration event | OnTransProdOrderCapNeedOnBeforeDeleteAll | (var Record Production Order, var Record Prod. Order Capacity Need, var Boolean) | 17-28 | - | - |
| Integration event | OnAfterSetProdOrderCompFilters | (var Record Prod. Order Component, Record Production Order) | 17-28 | - | - |
| Integration event | OnErrorIfUnableToClearWIPOnBeforeError | (Record Prod. Order Line, var Boolean) | 17-28 | - | - |
| Integration event | OnRunOnAfterChangeStatusFormRun | (var Record Production Order) | 17-26 | - | - |
| Integration event | OnTransProdOrderOnBeforeToProdOrderInsert | (var Record Production Order, Record Production Order) | 17-18 | - | - |
| Integration event | OnBeforeShowStatusMessage | (Record Production Order, Record Production Order, var Boolean) | 17-28 | - | - |
| Integration event | OnAfterChangeStatusOnProdOrder | (var Record Production Order, var Record Production Order, Enum Production Order Status, Date, Boolean, var Boolean) | 18-27 | - | - |
| Integration event | OnBeforeChangeStatusOnProdOrder | (var Record Production Order, Option, var Boolean, Date, Boolean) | 18-28 | - | - |
| Integration event | OnBeforeOnRun | (var Page Change Status on Prod. Order, var Record Production Order, var Boolean) | 18-19 | - | - |
| Integration event | OnBeforeFlushProdOrder | (var Record Production Order, Enum Production Order Status, Date, var Boolean) | 18-28 | - | - |
| Integration event | OnBeforeTransferLinks | (Record Production Order, Record Production Order, var Boolean) | 18-28 | - | - |
| Integration event | OnCheckBeforeFinishProdOrderOnAfterCheckProdOrder | (var Record Production Order) | 18-28 | - | - |
| Integration event | OnFlushProdOrderOnAfterPostFlushItemJnlLine | (var Record Item Journal Line) | 18-28 | - | - |
| Integration event | OnFlushProdOrderOnAfterProdOrderCompSetFilters | (Record Production Order, var Record Prod. Order Component) | 18-28 | - | - |
| Integration event | OnFlushProdOrderOnBeforeCopyItemTracking | (var Record Item Journal Line, Record Prod. Order Component, Record Item) | 18-28 | - | - |
| Integration event | OnFlushProdOrderProcessProdOrderRtngLineOnAfterCalcOutputQty | (Record Prod. Order Line, Record Prod. Order Routing Line, var Decimal, var Decimal) | 18-28 | - | - |
| Integration event | OnTransProdOrderCompOnAfterToProdOrderCompInsert | (var Record Prod. Order Component, var Record Prod. Order Component) | 18-28 | - | - |
| Integration event | OnTransProdOrderCompOnBeforeToProdOrderCompInsert | (var Record Prod. Order Component, var Record Prod. Order Component) | 18-28 | - | - |
| Integration event | OnTransProdOrderLineOnAfterDeleteReservEntries | (Record Prod. Order Line, var Record Prod. Order Line, var Enum Production Order Status) | 18-28 | - | - |
| Integration event | OnTransProdOrderOnAfterStatusIsReleased | (var Record Production Order, Record Production Order) | 18-28 | - | - |
| Integration event | OnBeforeTransProdOrder | (var Record Production Order, Enum Production Order Status) | 18-28 | - | - |
| Integration event | OnTransProdOrderLineOnBeforeFromProdOrderLineLoop | (Record Prod. Order Line, var Record Prod. Order Line, Enum Production Order Status) | 18-19 | - | - |
| Integration event | OnTransProdOrderLineOnAfterFromProdOrderLineFindSet | (Record Prod. Order Line, var Record Prod. Order Line, Enum Production Order Status) | 18-28 | - | - |
| Integration event | OnAfterSetTimeAndQuantityOmItemJnlLine | (var Record Item Journal Line, Record Prod. Order Routing Line, Decimal, Decimal) | 19-28 | - | - |
| Integration event | OnAfterCalculateQtyToPost | (Record Prod. Order Component, var Decimal, Record Production Order, Enum Production Order Status) | 19-28 | - | - |
| Integration event | OnCopyFromProdOrderRoutingLine | (var Record Prod. Order Routing Line, Record Prod. Order Routing Line, Date) | 19-28 | - | - |
| Integration event | OnTransProdOrderOnBeforeToProdOrderInsert | (var Record Production Order, Record Production Order, Date) | 19-28 | - | - |
| Integration event | OnBeforeOnRun | (var Page Change Status on Prod. Order, var Record Production Order, var Boolean, Enum Production Order Status, Date, Boolean) | 20-28 | - | - |
| Integration event | OnChangeProdOrderStatusOnBeforeTransProdOrder | (var Record Production Order, Enum Production Order Status) | 20-28 | - | - |
| Integration event | OnCheckBeforeFinishProdOrderOnAfterSetProdOrderCompFilters | (var Record Prod. Order Component, Record Production Order, var Record Purchase Line) | 20-28 | - | - |
| Integration event | OnFlushProdOrderOnAfterProdOrderLineLoopIteration | (var Record Prod. Order Line, Enum Production Order Status, Date) | 20-28 | - | - |
| Integration event | OnTransProdOrderLineOnBeforeFromProdOrderLineLoop | (Record Prod. Order Line, var Record Prod. Order Line, Enum Production Order Status, var Boolean) | 20 | - | - |
| Integration event | OnChangeProdOrderStatusOnBeforeDeleteDocReservation | (Record Production Order, var Boolean) | 20-28 | - | - |
| Integration event | OnAfterFlushProdOrderProcessProdOrderRtngLine | (Record Production Order, Record Prod. Order Line, Record Prod. Order Routing Line, Option, Date) | 20-28 | - | - |
| Integration event | OnAfterRoundQtyToPost | (Record Prod. Order Component, Decimal) | 20-28 | - | - |
| Integration event | OnCheckBeforeFinishProdOrderOnBeforeFindSet | (var Record Prod. Order Line, var Record Prod. Order Routing Line, var Boolean, var Boolean) | 20-28 | - | - |
| Integration event | OnBeforeTransProdOrderRtngCmtLn | (Record Production Order, Record Production Order, var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeTransProdOrderCmtLine | (Record Production Order, Record Production Order, var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeTransProdOrderBOMCmtLine | (Record Production Order, Record Production Order, var Boolean) | 21-28 | - | - |
| Integration event | OnTransProdOrderLineOnBeforeTransferPOLineToPOLine | (Record Prod. Order Line, var Record Prod. Order Line, Enum Production Order Status) | 21-28 | - | - |
| Integration event | OnTransProdOrderLineOnBeforeFromProdOrderLineLoop | (Record Prod. Order Line, var Record Prod. Order Line, Enum Production Order Status, var Boolean, Record Production Order) | 21-28 | - | - |
| Integration event | OnTransProdOrderLineOnBeforeFinishedInvtAdjmtEntryOrderModify | (var Record Inventory Adjmt. Entry (Order), Record Prod. Order Line, var Record Prod. Order Line, Record Production Order) | 22-28 | - | - |
| Integration event | OnTransferLinksOnBeforeCopyLinks | (var Record Production Order, var Record Production Order, var Boolean) | 22-28 | - | - |
| Integration event | OnTransProdOrderLineOnAfterFromProdOrderLineSetFilters | (var Record Prod. Order Line, var Record Production Order, Boolean) | 24-28 | - | - |
| Integration event | OnBeforeTransProdOrderComp | (Record Production Order, var Record Production Order, var Boolean) | 25-28 | - | - |
| Integration event | OnErrorIfUnableToClearWIPOnAfterProdOrderLineSetFilters | (Record Production Order, var Record Prod. Order Line) | 26-28 | - | - |
| Integration event | OnAfterTransferReopenProdOrderLine | (Record Prod. Order Line, Record Prod. Order Line) | 26-28 | - | - |
| Integration event | OnAfterTransferRelatedTablesToReleasedProdOrder | (Record Production Order) | 26-28 | - | - |
| Integration event | OnProcessProdOrderLineForReopenOnBeforeDeleteUpdateProdOrderLine | (Record Prod. Order Line) | 26-28 | - | - |
| Integration event | OnAfterTransferReopenProdOrder | (Record Production Order, Record Production Order) | 26-28 | - | - |
| Integration event | OnRunOnAfterChangeStatusFormRun | (var Record Production Order, var Page Change Status on Prod. Order) | 27-28 | - | - |
| Integration event | OnTransReopenProdOrderCompOnAfterInsert | (Record Prod. Order Component, Record Prod. Order Component) | 27-28 | - | - |
| Integration event | OnTransferReopenProdOrderRtngLineOnAfterInsert | (Record Prod. Order Routing Line, Record Prod. Order Routing Line, Record Production Order) | 27-28 | - | - |
| Integration event | OnAfterChangeStatusOnProdOrder | (var Record Production Order, var Record Production Order, Enum Production Order Status, Date, Boolean, var Boolean, Record Production Order) | 28 | - | - |
| Integration event | OnBeforeShowReleasedProdOrderDocument | (var Record Production Order, var Boolean) | 28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
