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

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/99000787-create-prod-order-lines/

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

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| CheckStructure | (Option, Code[20], Option, Boolean, Boolean) | - | public | 17-28 | - | - |
| Copy | (Record Production Order, Option, Code[10], Boolean) | Boolean | public | 17-28 | - | - |
| CopyDimFromSalesLine | (Record Sales Line, var Record Prod. Order Line) | - | public | 17-28 | - | - |
| SetSalesLine | (Record Sales Line) | - | public | 17-28 | - | - |
| CopyFromSalesOrder | (Record Sales Header) | Boolean | public | 18-28 | - | - |
| InitProdOrderLine | (Code[20], Code[10], Code[10]) | - | public | 25-28 | - | - |
| InsertProdOrderLine | () | Boolean | public | 25-28 | - | - |
| CheckMakeOrderLine | (var Record Prod. Order Component, var Record Prod. Order Line, Option, Boolean, Boolean) | Boolean | public | 25-28 | - | - |
| ReserveMultiLevelStructure | (var Record Prod. Order Component) | - | public | 25-28 | - | - |
| CheckReplenishmentSystemProdOrderAndNotProductionBlocked | (Code[20], Code[10], Code[10]) | Boolean | internal | 26-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterCopy | (var Record Production Order, var Boolean) | 17-28 | - | - |
| Integration event | OnAfterCreateProdOrderLine | (Record Production Order, Code[10], var Boolean) | 17-28 | - | - |
| Integration event | OnAfterInitProdOrderLine | (var Record Prod. Order Line, Record Production Order, Record Sales Line) | 17-28 | - | - |
| Integration event | OnAfterProdOrderLineInsert | (var Record Production Order, var Record Prod. Order Line, var Integer) | 17-28 | - | - |
| Integration event | OnAfterProcessProdOrderLine | (var Record Prod. Order Line, Option, Boolean) | 17-28 | - | - |
| Integration event | OnAfterReserveMultiLevelStructureComp | (var Record Prod. Order Line, var Record Prod. Order Component) | 17-28 | - | - |
| Integration event | OnAfterUpdateProdOrderLine | (var Record Prod. Order Line, Option, Boolean) | 17-28 | - | - |
| Integration event | OnBeforeCheckMultiLevelStructure | (Record Production Order, Option, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeCopy | (var Record Production Order, Option, Code[10], Boolean, var Boolean, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeCopyFromSalesOrder | (Record Sales Header, var Record Sales Line, Record Production Order, var Integer) | 17-28 | - | - |
| Integration event | OnBeforeInsertProdOrderLine | (var Record Prod. Order Line, var Record Prod. Order Line, Boolean, var Boolean) | 17 | - | - |
| Integration event | OnBeforeProcessProdOrderLine | (var Record Prod. Order Line, Record Production Order, Option, Boolean, var Boolean, var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeProdOrderLineInsert | (var Record Prod. Order Line, var Record Production Order, Boolean, var Record Sales Line) | 17-28 | - | - |
| Integration event | OnBeforeProdOrderLine3Modify | (var Record Prod. Order Line, Record Prod. Order Line) | 17-28 | - | - |
| Integration event | OnBeforeReserveMultiLevelStructureComp | (var Record Prod. Order Component, var Record Prod. Order Line, var Boolean) | 17-28 | - | - |
| Integration event | OnCopyFromFamilyOnAfterInitProdOrderLine | (Record Production Order, Record Family Line, var Record Prod. Order Line) | 17-28 | - | - |
| Integration event | OnCopyFromFamilyOnAfterInsertProdOrderLine | (var Record Prod. Order Line) | 17-28 | - | - |
| Integration event | OnCopyFromFamilyOnBeforeInsertProdOrderLine | (var Record Prod. Order Line, Record Family Line) | 17-28 | - | - |
| Integration event | OnCopyFromSalesOrderOnBeforeSalesPlanLineInsert | (var Record Sales Line, Record Sales Planning Line) | 17-21 | - | - |
| Integration event | OnCopyFromSalesOrderOnBeforeProdOrderLineModify | (var Record Prod. Order Line, Record Sales Line, Record Sales Planning Line, var Integer) | 17-28 | - | - |
| Integration event | OnCopyFromSalesOrderOnAfterCalcQuantityBase | (var Record Prod. Order Line, Boolean, var Record Sales Line, var Decimal) | 17-28 | - | - |
| Integration event | OnInitProdOrderLineAfterVariantCode | (var Record Prod. Order Line, Code[10]) | 17-28 | - | - |
| Integration event | OnInitProdOrderLineAfterScrap | (var Record Prod. Order Line, var Record Production Order) | 17-28 | - | - |
| Integration event | OnInitProdOrderLineBeforeAssignItemNo | (var Record Prod. Order Line, Code[20], Code[10], Code[10]) | 17-28 | - | - |
| Integration event | OnCheckMakeOrderLineBeforeIf | (var Record Production Order, var Record Prod. Order Line, var Record Prod. Order Component, var Boolean) | 17-28 | - | - |
| Integration event | OnCheckMakeOrderLineBeforeInsert | (var Record Prod. Order Line, var Record Prod. Order Component, var Boolean) | 17-28 | - | - |
| Integration event | OnCheckMakeOrderLineOnAfterUpdateProdOrderLine | (var Record Prod. Order Line) | 17-28 | - | - |
| Integration event | OnCopyOnProdOrderSourceTypeEnumExtension | (var Record Production Order) | 17-22 | Pending 20.0 | Event is never raised |
| Integration event | OnBeforeIsReplSystemProdOrder | (Record Sales Line, var Boolean, var Boolean) | 17-28 | - | - |
| Integration event | OnCreateProdOrderLineOnBeforeInitProdOrderLine | (var Boolean) | 17-28 | - | - |
| Integration event | OnBeforeInsertProdOrderLine | (var Record Prod. Order Line, var Record Prod. Order Line, var Boolean, var Boolean) | 18-28 | - | - |
| Integration event | OnCopyFromSalesOrderOnAfterSalesPlanLinesInsert | (Record Sales Header, var Record Sales Line) | 18-28 | - | - |
| Integration event | OnBeforeInitProdOrderLine | (Record Production Order, Record Sales Line, var Code[20], var Code[10], var Code[10], var Boolean) | 19-28 | - | - |
| Integration event | OnBeforeDeleteLinesForProductionOrder | (Record Production Order, var Integer, var Boolean) | 20-28 | - | - |
| Integration event | OnCopyFromSalesOrderOnAfterCalcShouldCreateTempSalesPlanningLines | (var Record Sales Line, var Boolean) | 20-28 | - | - |
| Integration event | OnProcessProdOrderLinesOnBeforeAdjustStartEndingDate | (var Record Production Order) | 20-28 | - | - |
| Integration event | OnAfterShouldIncreasePlanningLevel | (Record Prod. Order Component, Record Stockkeeping Unit, var Boolean) | 21-28 | - | - |
| Integration event | OnCopyFromFamilyOnAfterFamilyLineSetFilters | (var Record Family Line, Record Production Order) | 21-28 | - | - |
| Integration event | OnCopyFromSalesOrderOnBeforeSalesPlanLineInsert | (var Record Sales Line, var Record Sales Planning Line) | 22-28 | - | - |
| Integration event | OnCopyFromSalesOrderOnAfterProdOrderLineModify | (var Record Prod. Order Line, var Record Sales Line) | 23-28 | - | - |
| Integration event | OnUpdateProdOrderLineOnBeforeUpdateCompPlanningLevel | (var Record Prod. Order Line) | 28 | - | - |
| Integration event | OnCreateProdOrderLineOnBeforeCreateProdOrderLineFromItem | (var Boolean, var Boolean, var Record Production Order, Code[10]) | 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.
