---
title: "Codeunit 5851 Invt. Doc.-Post Shipment"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/5851-invt-doc-post-shipment/
type: codeunit
id: 5851
name: "Invt. Doc.-Post Shipment"
app: "Base Application"
namespace: Microsoft.Inventory.Document
versions: "18-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/5851-invt-doc-post-shipment/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 5851 Invt. Doc.-Post Shipment

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/5851-invt-doc-post-shipment/

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

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| SetHideValidationDialog | (Boolean) | - | public | 18-28 | - | - |
| SetPreviewMode | (Boolean) | - | public | 22-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterCheckInvtDocumentHeaderMandatoryFields | (var Record Invt. Document Header) | 18-28 | - | - |
| Integration event | OnAfterSetInvtDocumentLineFiltersFromDocument | (var Record Invt. Document Line, Record Invt. Document Header) | 18-28 | - | - |
| Integration event | OnAfterPostItemJnlLine | (Record Item Journal Line, Decimal, Decimal, Record Tracking Specification, Record Invt. Shipment Header, Record Invt. Shipment Line) | 18-28 | - | - |
| Integration event | OnAfterOnRun | (var Record Invt. Document Header, Record Invt. Document Header, var Record Invt. Document Line, Record Invt. Shipment Header, Record Invt. Shipment Line) | 18-28 | - | - |
| Integration event | OnAfterFillItemJournalLineQtyFromInvtShipmentLine | (var Record Item Journal Line, Record Invt. Shipment Line, Record Invt. Shipment Header) | 18-28 | - | - |
| Integration event | OnBeforeOnRun | (var Record Invt. Document Header, var Boolean, var Boolean) | 18-28 | - | - |
| Integration event | OnBeforePostWhseJnlLine | (Record Item Journal Line, Decimal, Decimal, var Record Tracking Specification) | 18-28 | - | - |
| Integration event | OnBeforeCheckInvtDocumentHeaderMandatoryFields | (var Record Invt. Document Header) | 18-28 | - | - |
| Integration event | OnBeforePostItemJnlLine | (Record Invt. Shipment Header, Record Invt. Shipment Line, var Boolean) | 18-28 | - | - |
| Integration event | OnRunOnAfterSetStatusReleased | (var Record Invt. Document Header, var Record Invt. Document Line, var Boolean) | 18-28 | - | - |
| Integration event | OnPostItemJnlLineOnAfterItemJnlLineInit | (var Record Item Journal Line, Record Invt. Shipment Header, Record Invt. Shipment Line) | 18-28 | - | - |
| Integration event | OnPostItemJnlLineOnBeforeTransferInvtDocToItemJnlLine | (var Record Invt. Document Line, var Record Item Journal Line, Record Invt. Shipment Header, Record Invt. Shipment Line) | 18-28 | - | - |
| Integration event | OnRunOnAfterInvtShptHeaderInit | (var Record Invt. Shipment Header, Record Invt. Document Header) | 18-28 | - | - |
| Integration event | OnRunOnAfterInvtShptHeaderInsert | (var Record Invt. Shipment Header, Record Invt. Document Header) | 18-28 | - | - |
| Integration event | OnRunOnAfterInvtShptLineInit | (var Record Invt. Shipment Line, Record Invt. Document Line, var Record Invt. Shipment Header, Record Invt. Document Header) | 18-28 | - | - |
| Integration event | OnRunOnAfterCommitPostInvtShptDoc | (var Record Invt. Document Header, var Record Invt. Document Line, Record Invt. Shipment Header, Record Invt. Shipment Line, Record Item Journal Line, var Boolean) | 18-28 | - | - |
| Integration event | OnRunOnAfterInvtShptLineInsert | (var Record Invt. Shipment Line, Record Invt. Document Line, var Record Invt. Shipment Header, Record Invt. Document Header) | 18-28 | - | - |
| Integration event | OnRunOnBeforeInvtDocLineFind | (var Record Invt. Document Line, Record Invt. Document Header) | 18-28 | - | - |
| Integration event | OnRunOnBeforeCommitPostInvtShptDoc | (var Record Invt. Document Header, var Record Invt. Document Line, Record Invt. Shipment Header, Record Invt. Shipment Line, Record Item Journal Line, var Boolean) | 18-28 | - | - |
| Integration event | OnPostItemJnlLineOnBeforeItemJnlPostLineRunWithCheck | (var Record Item Journal Line, Record Invt. Shipment Header, Record Invt. Shipment Line, Decimal, Decimal) | 18-28 | - | - |
| Integration event | OnRunOnBeforeInvtShptHeaderInsert | (var Record Invt. Shipment Header, Record Invt. Document Header) | 18-28 | - | - |
| Integration event | OnRunOnBeforeInvtShptLineInsert | (var Record Invt. Shipment Line, Record Invt. Document Line, var Record Invt. Shipment Header, Record Invt. Document Header) | 18-28 | - | - |
| Integration event | OnRunOnAfterInvtDocPost | (Record Invt. Document Header, Record Invt. Document Line) | 20-28 | - | - |
| Integration event | OnRunOnAfterCheckLocation | (var Record Invt. Document Header) | 22-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.
