---
id: object/codeunit/5884
type: object
title: Codeunit 5884 "Phys. Invt. Order-Post"
summary: Codeunit 5884 "Phys. Invt. Order-Post" in Base Application (Microsoft.Inventory.Counting.Document). 4 public procedures, 26 events. Present since at least BC23, still in BC30, changed in BC24, BC27.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "27"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 1971804e02b01e8705e1cc2248a3c5fde6fb01572106ea735f44949e086898a9
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Counting/Document/PhysInvtOrderPost.Codeunit.al
    title: src/Layers/W1/BaseApp/Inventory/Counting/Document/PhysInvtOrderPost.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/9180
object_type: codeunit
object_id: 5884
name: Phys. Invt. Order-Post
namespace: Microsoft.Inventory.Counting.Document
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "27"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 47
  events: 26
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 12
  called_by: 2
  implements: 0
---

# Codeunit 5884 "Phys. Invt. Order-Post"

> Codeunit 5884 "Phys. Invt. Order-Post" in Base Application (Microsoft.Inventory.Counting.Document). 4 public procedures, 26 events. Present since at least BC23, still in BC30, changed in BC24, BC27.

Base Application · Microsoft.Inventory.Counting.Document · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Counting/Document/PhysInvtOrderPost.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | Phys. Invt. Order Header |
| Permissions | TableData "Item Entry Relation" = ri, TableData "Pstd. Phys. Invt. Order Hdr" = rimd, TableData "Pstd. Phys. Invt. Order Line" = rimd, TableData "Pstd. Phys. Invt. Record Hdr" = rimd, TableData "Pstd. Phys. Invt. Record Line" = rimd, TableData "Pstd. Phys. Invt. Tracking" = rimd, TableData "Pstd.Exp... |

## Events published

- `OnAfterOnRun(var PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var PstdPhysInvtOrderHdr: Record "Pstd. Phys. Invt. Order Hdr")` (integration)
- `OnBeforeCode(var PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var HideProgressWindow: Boolean; var SuppressCommit: Boolean)` (integration)
- `OnBeforeItemJnlPostLine(var ItemJournalLine: Record "Item Journal Line"; PhysInvtOrderLine: Record "Phys. Invt. Order Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; Positive: Boolean)` (integration)
- `OnPostItemJnlLineOnBeforeTransferResEntry(var ItemJournalLine: Record "Item Journal Line"; PhysInvtOrderLine: Record "Phys. Invt. Order Line"; Qty: Decimal; Positive: Boolean)` (integration)
- `OnBeforeChecLocationDirectedPutAwayAndPick(PhysInvtOrderLine: Record "Phys. Invt. Order Line"; var IsHandled: Boolean)` (integration)
- `OnCheckOrderLineOnBeforeGetSamePhysInvtOrderLine(PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; PhysInvtOrderLine: Record "Phys. Invt. Order Line"; var PhysInvtOrderLine2: Record "Phys. Invt. Order Line"; var ErrorText: Text[250]; var IsHandled: Boolean)` (integration)
- `OnInsertEntryRelationOnBeforeInsert(var ItemEntryRelation: Record "Item Entry Relation"; TrackingSpecification: Record "Tracking Specification"; PstdPhysInvtOrderLine: Record "Pstd. Phys. Invt. Order Line")` (integration)
- `OnBeforeInsertPostedHeader(var PhysInvtOrderHeader: Record "Phys. Invt. Order Header")` (integration)
- `OnBeforeInsertPostedLine(PstdPhysInvtOrderHdr: Record "Pstd. Phys. Invt. Order Hdr"; PhysInvtOrderLine: Record "Phys. Invt. Order Line"; var PstdPhysInvtOrderLine: Record "Pstd. Phys. Invt. Order Line"; var IsHandled: Boolean)` (integration)
- `OnCodeOnAfterSetFilters(var PhysInvtOrderLine: Record "Phys. Invt. Order Line")` (integration)
- `OnInsertPostedHeaderOnAfterTransferfields(PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var PstdPhysInvtOrderHdr: Record "Pstd. Phys. Invt. Order Hdr")` (integration)
- `OnInsertPostedHeaderOnBeforeInsert(PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var PstdPhysInvtOrderHdr: Record "Pstd. Phys. Invt. Order Hdr"; var IsHandled: Boolean)` (integration)
- `OnInsertPostedRecordingsOnBeforeInsertHdr(PhysInvtRecordHeader: Record "Phys. Invt. Record Header"; var PstdPhysInvtRecordHdr: Record "Pstd. Phys. Invt. Record Hdr"; var IsHandled: Boolean)` (integration)
- `OnInsertPostedRecordingsOnBeforeInsertLine(PstdPhysInvtRecordHdr: Record "Pstd. Phys. Invt. Record Hdr"; PhysInvtRecordLine: Record "Phys. Invt. Record Line"; var PstdPhysInvtRecordLine: Record "Pstd. Phys. Invt. Record Line"; var IsHandled: Boolean)` (integration)
- `OnPostWhseJnlLineOnBeforeCheckWhseJnlLine(var TempWhseJnlLine2: Record "Warehouse Journal Line" temporary; Positive: Boolean; Location: Record Location; PhysInvtOrderLine: Record "Phys. Invt. Order Line")` (integration)
- `OnPostPhysInventoryOrderLineOnAfterInsertPostedLine(PhysInvtOrderLine: Record "Phys. Invt. Order Line"; var IsHandled: Boolean)` (integration)
- `OnPostPhysInventoryOrderLineOnBeforePostPositiveItemJnlLine(var PhysInvtOrderLine: Record "Phys. Invt. Order Line"; WhsePosting: Boolean; var ItemJnlLine: Record "Item Journal Line"; var PstdPhysInvtOrderHdr: Record "Pstd. Phys. Invt. Order Hdr"; var PstdPhysInvtOrderLine: Record "Pstd. Phys. Invt. Order Line")` (integration)
- `OnBeforePostWhseJnlLine(var ItemJnlLine: Record "Item Journal Line"; var PhysInvtOrderLine: Record "Phys. Invt. Order Line"; var PstdPhysInvtOrderHdr: Record "Pstd. Phys. Invt. Order Hdr"; var OriginalQuantity: Decimal; var OriginalQuantityBase: Decimal; var Positive: Boolean; var IsHandled: Boolean)` (integration)
- `OnAfterIsDifference(PhysInvtOrderLine: Record "Phys. Invt. Order Line")` (integration)
- `OnThrowDifferenceError(PhysInvtOrderLine: Record "Phys. Invt. Order Line"; var ErrorMsg: Text)` (integration)
- `OnCheckOrderLineOnBeforeTestFieldItemBlocked(Item: Record "Item"; var IsHandled: Boolean)` (integration)
- `OnCheckOrderLineOnBeforeTestFieldItemVariantBlocked(ItemVariant: Record "Item Variant"; var IsHandled: Boolean)` (integration)
- `OnCodeOnAferPostPhysInventoryOrderLineNonNegative(var PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var PhysInvtOrderLine: Record "Phys. Invt. Order Line"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line")` (integration)
- `OnAfterCode(var PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var PstdPhysInvtOrderHdr: Record "Pstd. Phys. Invt. Order Hdr")` (integration)
- `OnCodeOnBeforeCheckLinesToPost(var PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var LinesToPost: Boolean; var IsHandled: Boolean)` (integration)
- `OnCodeOnAfterMakeInventoryAdjustment(var PhysInvtOrderHeader: Record "Phys. Invt. Order Header")` (integration)

## Procedures

- `Code()`
- `SetSuppressCommit(NewSuppressCommit: Boolean)`
- `SetHideProgressWindow(NewHideProgressWindow: Boolean)`
- `SetPreviewMode(NewPreviewMode: Boolean)` (internal)

Plus 17 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 5875 "Phys. Invt. Order Header"](../table/5875.md)

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 408 "DimensionManagement"](../codeunit/408.md) (4 calls: `CheckDimComb → CheckDimIDComb`, `CheckDimComb → GetDimCombErr`, `CheckDimValuePosting → CheckDimValuePosting`, …)
- [Codeunit 7380 "Phys. Invt. Count.-Management"](../codeunit/7380.md) (3 calls: `Code → AddToTempItemSKUList`, `Code → InitTempItemSKUList`, `Code → UpdateItemSKUListPhysInvtCount`)
- [Codeunit 22 "Item Jnl.-Post Line"](../codeunit/22.md) (2 calls: `InsertEntryRelation → CollectTrackingSpecification`, `PostItemJnlLine → RunWithCheck`)
- [Codeunit 7302 "WMS Management"](../codeunit/7302.md) (2 calls: `PostWhseJnlLine → CheckWhseJnlLine`, `PostWhseJnlLine → CreateWhseJnlLine`)
- [Codeunit 19 "Gen. Jnl.-Post Preview"](../codeunit/19.md) (1 call: `Code → ThrowError`)
- [Codeunit 5889 "Phys. Invt. Tracking Mgt."](../codeunit/5889.md) (1 call: `PostItemJnlLine → TransferResEntryToItemJnlLine`)
- [Codeunit 5894 "Inventory Adjustment Handler"](../codeunit/5894.md) (1 call: `MakeInventoryAdjustment → MakeInventoryAdjustment`)
- [Codeunit 6500 "Item Tracking Management"](../codeunit/6500.md) (1 call: `PostWhseJnlLine → SplitWhseJnlLine`)
- [Codeunit 7301 "Whse. Jnl.-Register Line"](../codeunit/7301.md) (1 call: `PostWhseJnlLine → (object)`)
- [Codeunit 9070 "Document Errors Mgt."](../codeunit/9070.md) (1 call: `Code → GetNothingToPostErrorMsg`)
- [Codeunit 9500 "Sequence No. Mgt."](../codeunit/9500.md) (1 call: `OnRun → SetPreviewMode`)
- [Page 456 "No. Series"](../page/456.md) (1 call: `Code → (object)`)

## Called by

- [Codeunit 5883 "Phys. Invt. Order-Post (Y/N)"](../codeunit/5883.md) (3 calls: `OnRun → (object)`, `OnRunPreview → (object)`, `OnRunPreview → SetPreviewMode`)
- [Codeunit 5885 "Phys. Invt. Order-Post + Print"](../codeunit/5885.md) (1 call: `OnRun → (object)`)

## Recent changes

- 2026-10-05 [#9180 Copy record links to posted Phys. Invt. Order and Recording headers](../../changes/bcapps/9180.md) (main, BC30, fix)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC27

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Phys. Invt. Order-Post")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
