---
title: "Codeunit 5857 Copy Invt. Document Mgt."
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/5857-copy-invt-document-mgt/
type: codeunit
id: 5857
name: "Copy Invt. Document Mgt."
app: "Base Application"
namespace: Microsoft.Inventory.Document
versions: "18-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/5857-copy-invt-document-mgt/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 5857 Copy Invt. Document Mgt.

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/5857-copy-invt-document-mgt/

| | |
| --- | --- |
| App | Base Application |
| Namespace | Microsoft.Inventory.Document |
| Versions | 18-28 |
| Source file | Inventory/Document/CopyInvtDocumentMgt.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| SetProperties | (Boolean, Boolean, Boolean, Boolean, Boolean) | - | public | 18-28 | - | - |
| CopyItemDoc | (Enum Invt. Doc. Document Type From, Code[20], var Record Invt. Document Header) | - | public | 18-28 | - | - |
| GetItemDocLedgerEntryNo | (Code[20], Integer, Integer) | Integer | public | 18-28 | - | - |
| CheckItemAvailable | (var Record Invt. Document Header, var Record Invt. Document Line) | - | public | 20-28 | - | - |
| SetCopyItemTracking | (Boolean) | - | public | 23-28 | - | - |
| CopyAsCorrection | (Boolean) | - | public | 23-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnCopyInvtDocLineOnBeforeCopyItemTrackingAndAppliesValues | (var Record Invt. Document Header, var Record Invt. Document Line, var Record Invt. Document Header, var Record Invt. Document Line, Enum Invt. Doc. Document Type From, var Boolean, var Boolean) | 23-28 | - | - |
| Integration event | OnAfterCopyInvtDocLine | (var Record Invt. Document Line, var Record Invt. Document Header, var Record Invt. Document Line) | 23-28 | - | - |
| Integration event | OnCopyItemDocOnBeforeLoopFromInventoryDocumentLine | (var Record Invt. Document Line) | 25-28 | - | - |
| Integration event | OnCopyItemDocOnBeforeLoopFromInventoryReceiptLine | (var Record Invt. Receipt Line) | 25-28 | - | - |
| Integration event | OnCopyItemDocOnBeforeLoopFromInventoryShipmentLine | (var Record Invt. Shipment Line) | 25-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.
