---
title: "Codeunit 99000792 Create Prod. Order from Sale"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/99000792-create-prod-order-from-sale/
type: codeunit
id: 99000792
name: "Create Prod. Order from Sale"
app: "Base Application"
namespace: Microsoft.Manufacturing.Document
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/99000792-create-prod-order-from-sale/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 99000792 Create Prod. Order from Sale

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/99000792-create-prod-order-from-sale/

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

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| CreateProdOrder | (Record Sales Line, Enum Production Order Status, Option) | - | public | 17-20 | Pending 18.0 | Replaced by CreateProductionOrder(). |
| SetHideValidationDialog | (Boolean) | - | public | 17-28 | - | - |
| CreateProductionOrder | (Record Sales Line, Enum Production Order Status, Enum Create Production Order Type) | - | public | 18-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterCreateProdOrder | (var Record Production Order, var Record Sales Line) | 17-28 | - | - |
| Integration event | OnAfterCreateProdOrderFromSalesLine | (var Record Production Order, var Record Sales Line) | 17-28 | - | - |
| Integration event | OnBeforeCreateProdOrderLines | (var Record Production Order, var Record Sales Line, var Boolean) | 17-25 | - | - |
| Integration event | OnBeforeUpdateSalesLineReserve | (var Record Sales Line, var Record Prod. Order Line, var Boolean) | 17-28 | - | - |
| Integration event | OnCreateProdOrderOnAfterProdOrderInsert | (var Record Production Order, Record Sales Line) | 17-28 | - | - |
| Integration event | OnCreateProdOrderOnBeforeProdOrderInsert | (var Record Production Order, Record Sales Line) | 17-28 | - | - |
| Integration event | OnCreateProductionOrderOnBeforeProdOrderLineModify | (var Record Prod. Order Line, var Record Sales Line) | 17 | - | - |
| Integration event | OnCreateProdOrderOnBeforeProcessItemSourceType | (var Record Production Order, var Record Sales Line, var Boolean) | 17-28 | - | - |
| Integration event | OnCreateProductionOrderOnBeforeProdOrderLineModify | (var Record Prod. Order Line, var Record Sales Line, var Record Production Order, var Codeunit Sales Line-Reserve) | 18-28 | - | - |
| Integration event | OnCreateProductionOrderOnBeforeItemOrder | (var Record Production Order, var Record Sales Line) | 18-28 | - | - |
| Integration event | OnCreateProductionOrderOnAfterProdOrderLineModify | (var Record Prod. Order Line, var Record Sales Line) | 23-28 | - | - |
| Integration event | OnBeforeCreateProdOrderLines | (var Record Production Order, var Record Sales Line, var Boolean, Enum Create Production Order Type) | 26-28 | - | - |
| Integration event | OnCreateProductionOrderOnOrderTypeElse | (var Record Production Order, var Record Sales Line) | 26-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.
