---
title: "Codeunit 5880 Phys. Invt. Order-Finish, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/points/
object: https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 5880 Phys. Invt. Order-Finish, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/points/

12 procedures and triggers with a step in src/Layers/W1/BaseApp/Inventory/Counting/Document/PhysInvtOrderFinish.Codeunit.al, in source order, read from the text, not from a run.

## OnRun

[Line 17](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L17), trigger.

- [19](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L19) raises `OnBeforeOnRun`
- [21](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L21) calls `Code`
- [24](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L24) raises `OnAfterOnRun`

## Code

[Line 45](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L45).

- [50](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L50) raises `OnBeforeCode`
- [75](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L75) raises `OnCodeOnAfterSetFilters`
- [82](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L82) calls [Table 5876 Phys. Invt. Order Line](https://jonas-paprotka.de/ref/table/5876-phys-invt-order-line/) `EmptyLine`
- [83](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L83) calls `CheckOrderLine`
- [96](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L96) raises `OnCodeOnAfterSetEntryTypePhysInvtOrderLine`
- [99](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L99) calls `IsBinMandatoryNoWhseTracking`
- [104](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L104) writes [Table 6025 Invt. Order Tracking](https://jonas-paprotka.de/ref/table/6025-invt-order-tracking/) DeleteAll
- [105](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L105) calls `CreateOrderTrackingBufferLines`
- [106](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L106) calls `CreateReservationEntries`
- [114](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L114) raises `OnCodeOnBeforePhysInvtOrderLineCalcCosts`, IsHandled
- [116](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L116) calls [Table 5876 Phys. Invt. Order Line](https://jonas-paprotka.de/ref/table/5876-phys-invt-order-line/) `CalcCosts`
- [118](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L118) raises `OnBeforePhysInvtOrderLineModify`
- [119](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L119) writes [Table 5876 Phys. Invt. Order Line](https://jonas-paprotka.de/ref/table/5876-phys-invt-order-line/) Modify
- [129](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L129) raises `OnCodeOnAfterSetFilters`
- [132](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L132) calls `IsNewPhysInvtOrderLineGroup`
- [136](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L136) calls `IsBinMandatoryNoWhseTracking`
- [138](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L138) writes [Table 6025 Invt. Order Tracking](https://jonas-paprotka.de/ref/table/6025-invt-order-tracking/) DeleteAll
- [139](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L139) calls `UpdateBufferFromItemLedgerEntries`
- [141](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L141) calls `SetPhysInvtRecordLineFilters`
- [154](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L154) calls `UpdateBufferRecordedQty`
- [155](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L155) raises `OnCodeOnAfterUpdateFromPhysInvtRecordLine2`
- [165](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L165) raises `OnCodeOnBeforeModifyInvtOrderTracking`
- [166](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L166) writes [Table 6025 Invt. Order Tracking](https://jonas-paprotka.de/ref/table/6025-invt-order-tracking/) Modify
- [174](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L174) writes [Table 5876 Phys. Invt. Order Line](https://jonas-paprotka.de/ref/table/5876-phys-invt-order-line/) Modify
- [177](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L177) raises `OnCodeOnBeforeCreateReservEntries`, IsHandled
- [179](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L179) calls `CreateReservationEntries`
- [184](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L184) raises `OnCodeOnBeforePhysInvtOrderLine2CalcCosts`, IsHandled
- [186](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L186) calls [Table 5876 Phys. Invt. Order Line](https://jonas-paprotka.de/ref/table/5876-phys-invt-order-line/) `CalcCosts`
- [187](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L187) writes [Table 5876 Phys. Invt. Order Line](https://jonas-paprotka.de/ref/table/5876-phys-invt-order-line/) Modify
- [193](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L193) raises `OnCodeOnBeforeSetStatusToFinished`
- [195](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L195) writes [Table 5875 Phys. Invt. Order Header](https://jonas-paprotka.de/ref/table/5875-phys-invt-order-header/) Modify

## CheckOrderLine

[Line 198](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L198), local.

- [204](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L204) raises `OnBeforeCheckOrderLine`, IsHandled
- [208](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L208) calls [Table 5876 Phys. Invt. Order Line](https://jonas-paprotka.de/ref/table/5876-phys-invt-order-line/) `CheckLine`
- [219](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L219) raises `OnBeforeGetSamePhysInvtOrderLine`, IsHandled
- [221](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L221) calls [Table 5875 Phys. Invt. Order Header](https://jonas-paprotka.de/ref/table/5875-phys-invt-order-header/) `GetSamePhysInvtOrderLine`

## CreateOrderTrackingBufferLines

[Line 227](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L227).

- [242](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L242) calls `UpdateBufferRecordedQty`
- [243](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L243) raises `OnCreateOrderTrackingBufferLinesFromPhysInvtRecordLine`
- [254](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L254) calls `UpdateBufferExpectedQty`
- [255](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L255) raises `OnCreateOrderTrackingBufferLinesFromExpInvtOrderTracking`
- [265](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L265) raises `OnCreateOrderTrackingBufferLinesOnBeforeModifyTempInvtOrderTrackingBuffer`
- [266](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L266) writes [Table 6025 Invt. Order Tracking](https://jonas-paprotka.de/ref/table/6025-invt-order-tracking/) Modify

## CreateReservationEntries

[Line 270](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L270).

- [281](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L281) calls `CalculateQtyToTransfer`
- [286](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L286) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Item No.`
- [287](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L287) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Variant Code`
- [288](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L288) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Location Code`
- [289](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L289) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Serial No.`
- [290](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L290) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Lot No.`
- [291](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L291) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Package No.`
- [292](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L292) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Expiration Date`
- [293](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L293) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Source Type`
- [294](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L294) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Source ID`
- [295](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L295) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Source Ref. No.`
- [296](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L296) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Quantity`
- [303](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L303) validates [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) `Creation Date`
- [311](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L311) writes [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) Insert
- [312](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L312) raises `OnCreateReservEntriesOnBeforeInsert2`
- [315](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L315) writes [Table 337 Reservation Entry](https://jonas-paprotka.de/ref/table/337-reservation-entry/) Modify
- [319](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L319) writes [Table 6025 Invt. Order Tracking](https://jonas-paprotka.de/ref/table/6025-invt-order-tracking/) Modify
- [320](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L320) raises `OnCreateReservEntriesOnAfterTempPhysInvtTrackingBufferModify`

## CalculateQtyToTransfer

[Line 324](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L324), local.

- [339](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L339) raises `OnAfterCalculateQtyToTransfer`

## IsBinMandatoryNoWhseTracking

[Line 342](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L342), local.

- [344](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L344) calls [Codeunit 5889 Phys. Invt. Tracking Mgt.](https://jonas-paprotka.de/ref/codeunit/5889-phys-invt-tracking-mgt/) `LocationIsBinMandatory`
- [344](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L344) calls [Codeunit 5889 Phys. Invt. Tracking Mgt.](https://jonas-paprotka.de/ref/codeunit/5889-phys-invt-tracking-mgt/) `GetTrackingNosFromWhse`

## UpdateBufferFromItemLedgerEntries

[Line 347](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L347), local.

- [360](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L360) calls [Table 6565 Item Tracking Setup](https://jonas-paprotka.de/ref/table/6565-item-tracking-setup/) `CopyTrackingFromitemLedgerEntry`
- [361](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L361) calls `UpdateBufferExpectedQty`
- [362](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L362) raises `OnUpdateBufferFromItemLedgerEntriesOnAfterUpdateExpectedQty2`

## UpdateBufferRecordedQty

[Line 366](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L366), local.

- [375](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L375) writes [Table 6025 Invt. Order Tracking](https://jonas-paprotka.de/ref/table/6025-invt-order-tracking/) Insert
- [378](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L378) writes [Table 6025 Invt. Order Tracking](https://jonas-paprotka.de/ref/table/6025-invt-order-tracking/) Modify

## UpdateBufferExpectedQty

[Line 382](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L382), local.

- [391](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L391) writes [Table 6025 Invt. Order Tracking](https://jonas-paprotka.de/ref/table/6025-invt-order-tracking/) Insert
- [394](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L394) writes [Table 6025 Invt. Order Tracking](https://jonas-paprotka.de/ref/table/6025-invt-order-tracking/) Modify

## IsNewPhysInvtOrderLineGroup

[Line 399](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L399), local.

- [405](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L405) raises `OnAfterIsNewPhysInvtOrderLineGroup`

## SetPhysInvtRecordLineFilters

[Line 408](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L408), local.

- [417](https://jonas-paprotka.de/ref/codeunit/5880-phys-invt-order-finish/source/#L417) raises `OnAfterSetPhysInvtRecordLineFilters`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
