---
id: object/codeunit/5880
type: object
title: Codeunit 5880 "Phys. Invt. Order-Finish"
summary: Codeunit 5880 "Phys. Invt. Order-Finish" in Base Application (Microsoft.Inventory.Counting.Document). 4 public procedures, 23 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: 5c3c180e7cf732c6ff2f5c83ca2e4d89aeed25301ba94f98f2ca8ac725a24009
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Counting/Document/PhysInvtOrderFinish.Codeunit.al
    title: src/Layers/W1/BaseApp/Inventory/Counting/Document/PhysInvtOrderFinish.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 5880
name: Phys. Invt. Order-Finish
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: 35
  events: 23
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 1
  implements: 0
---

# Codeunit 5880 "Phys. Invt. Order-Finish"

> Codeunit 5880 "Phys. Invt. Order-Finish" in Base Application (Microsoft.Inventory.Counting.Document). 4 public procedures, 23 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/PhysInvtOrderFinish.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | Phys. Invt. Order Header |

## Events published

- `OnAfterCalculateQtyToTransfer(var TempInvtOrderTrackingBuffer: Record "Invt. Order Tracking" temporary; AllBufferLines: Boolean; MaxQtyToTransfer: Decimal; var QtyToTransfer: Decimal)` (integration)
- `OnAfterOnRun(var PhysInvtOrderHeader: Record "Phys. Invt. Order Header")` (integration)
- `OnBeforeCheckOrderLine(PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; PhysInvtOrderLine: Record "Phys. Invt. Order Line"; var Item: Record Item; var IsHandled: Boolean; var PhysInvtOrderLine2: Record "Phys. Invt. Order Line")` (integration)
- `OnBeforeCode(var PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var HideProgressWindow: Boolean)` (integration)
- `OnBeforeGetSamePhysInvtOrderLine(var PhysInvtOrderLine: Record "Phys. Invt. Order Line"; PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var IsHandled: Boolean; var PhysInvtOrderLine2: Record "Phys. Invt. Order Line")` (integration)
- `OnBeforePhysInvtOrderLineModify(var PhysInvtOrderLine: Record "Phys. Invt. Order Line")` (integration)
- `OnBeforeOnRun(var PhysInvtOrderHeader: Record "Phys. Invt. Order Header")` (integration)
- `OnCodeOnAfterSetFilters(var PhysInvtOrderLine: Record "Phys. Invt. Order Line")` (integration)
- `OnCodeOnAfterUpdateFromPhysInvtRecordLine2(var InvtOrderTracking: Record "Invt. Order Tracking"; PhysInvtRecordLine: Record "Phys. Invt. Record Line")` (integration)
- `OnCodeOnBeforeCreateReservEntries(var PhysInvtOrderLine2: Record "Phys. Invt. Order Line"; var IsHandled: Boolean)` (integration)
- `OnCreateReservEntriesOnBeforeInsert2(var ReservationEntry: Record "Reservation Entry"; InvtOrderTracking: Record "Invt. Order Tracking"; PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var PhysInvtOrderLine: Record "Phys. Invt. Order Line")` (integration)
- `OnCreateReservEntriesOnAfterTempPhysInvtTrackingBufferModify(AllBufferLines: Boolean; var MaxQtyToTransfer: Decimal; QtyToTransfer: Decimal; var TempInvtOrderTracking: Record "Invt. Order Tracking" temporary)` (integration)
- `OnCreateOrderTrackingBufferLinesFromPhysInvtRecordLine(var TempInvtOrderTracking: Record "Invt. Order Tracking" temporary; PhysInvtRecordLine: Record "Phys. Invt. Record Line")` (integration)
- `OnCreateOrderTrackingBufferLinesFromExpInvtOrderTracking(var TempInvtOrderTracking: Record "Invt. Order Tracking" temporary; ExpInvtOrderTracking: Record "Exp. Invt. Order Tracking")` (integration)
- `OnUpdateBufferFromItemLedgerEntriesOnAfterUpdateExpectedQty2(var InvtOrderTracking: Record "Invt. Order Tracking"; ItemLedgerEntry: Record "Item Ledger Entry")` (integration)
- `OnAfterIsNewPhysInvtOrderLineGroup(PhysInvtOrderLine: Record "Phys. Invt. Order Line"; LastPhysInvtOrderLine: Record "Phys. Invt. Order Line"; var Result: Boolean)` (integration)
- `OnAfterSetPhysInvtRecordLineFilters(var PhysInvtOrderLine2: Record "Phys. Invt. Order Line"; PhysInvtOrderLine: Record "Phys. Invt. Order Line")` (integration)
- `OnCodeOnBeforePhysInvtOrderLineCalcCosts(var PhysInvtOrderLine: Record "Phys. Invt. Order Line"; var IsHandled: Boolean)` (integration)
- `OnCodeOnBeforePhysInvtOrderLine2CalcCosts(var PhysInvtOrderLine2: Record "Phys. Invt. Order Line"; var IsHandled: Boolean)` (integration)
- `OnCodeOnBeforeSetStatusToFinished(var PhysInvtOrderHeader: Record "Phys. Invt. Order Header")` (integration)
- `OnCodeOnBeforeModifyInvtOrderTracking(var TempInvtOrderTracking: Record "Invt. Order Tracking" temporary)` (integration)
- `OnCodeOnAfterSetEntryTypePhysInvtOrderLine(var PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var PhysInvtOrderLine: Record "Phys. Invt. Order Line"; Item: Record Item)` (integration)
- `OnCreateOrderTrackingBufferLinesOnBeforeModifyTempInvtOrderTrackingBuffer(var TempInvtOrderTracking: Record "Invt. Order Tracking" temporary; DocNo: Code[20]; LineNo: Integer)` (integration)

## Procedures

- `Code()`
- `CreateOrderTrackingBufferLines(DocNo: Code[20]; LineNo: Integer)`
- `CreateReservationEntries(DocNo: Code[20]; LineNo: Integer; AllBufferLines: Boolean; MaxQtyToTransfer: Decimal)`
- `SetHideProgressWindow(NewHideProgressWindow: Boolean)`

Plus 8 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 5889 "Phys. Invt. Tracking Mgt."](../codeunit/5889.md) (2 calls: `IsBinMandatoryNoWhseTracking → GetTrackingNosFromWhse`, `IsBinMandatoryNoWhseTracking → LocationIsBinMandatory`)

## Called by

- [Codeunit 5879 "Phys. Invt. Order-Finish (Y/N)"](../codeunit/5879.md) (1 call: `OnRun → (object)`)

## 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-Finish")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
