---
id: object/codeunit/5747
type: object
title: Codeunit 5747 "Purch. Whse. Post Shipment"
summary: Codeunit 5747 "Purch. Whse. Post Shipment" in Base Application (Microsoft.Warehouse.Posting). 19 events, 5 event subscribers. Introduced in BC25, still in BC30, changed in BC26.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: "25"
  last_changed: "26"
  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: 917dc32076dcbd60aa1c90462078e861dbb17fc07458d72d43feff6b6b1e877f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Purchases/PurchWhsePostShipment.Codeunit.al
    title: src/Layers/W1/BaseApp/Purchases/PurchWhsePostShipment.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: 5747
name: Purch. Whse. Post Shipment
namespace: Microsoft.Warehouse.Posting
app: Base Application
extends: null
first_version: "25"
last_version: "30"
present_in:
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "26"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 32
  events: 19
  subscribers: 5
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 0
  implements: 0
---

# Codeunit 5747 "Purch. Whse. Post Shipment"

> Codeunit 5747 "Purch. Whse. Post Shipment" in Base Application (Microsoft.Warehouse.Posting). 19 events, 5 event subscribers. Introduced in BC25, still in BC30, changed in BC26.

Base Application · Microsoft.Warehouse.Posting · BC25-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Purchases/PurchWhsePostShipment.Codeunit.al) · facts from BC29

## Events published

- `OnBeforeHandlePurchaseLine(var WarehouseShipmentLine: Record "Warehouse Shipment Line"; var PurchLine: Record "Purchase Line"; WhseShptHeader: Record "Warehouse Shipment Header"; var ModifyLine: Boolean; var IsHandled: Boolean; WhsePostParameters: Record "Whse. Post Parameters")` (integration)
- `OnInitSourceDocumentHeaderOnBeforePurchaseHeaderUpdatePostingDate(var PurchaseHeader: Record "Purchase Header"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; var ModifyHeader: Boolean; var ValidatePostingDate: Boolean; var IsHandled: Boolean)` (integration)
- `OnInitSourceDocumentHeaderOnBeforeReopenPurchHeader(var WhseShptLine: Record "Warehouse Shipment Line"; var PurchaseHeader: Record "Purchase Header")` (integration)
- `OnHandlePurchLineOnNonWhseLineOnAfterCalcModifyLine(var PurchLine: Record "Purchase Line"; var ModifyLine: Boolean)` (integration)
- `OnHandlePurchaseLineOnAfterValidateQtytoReceive(var PurchLine: Record "Purchase Line"; var WhseShptLine: Record "Warehouse Shipment Line")` (integration)
- `OnHandlePurchaseLineOnAfterValidateRetQtytoShip(var PurchLine: Record "Purchase Line"; var WhseShptLine: Record "Warehouse Shipment Line")` (integration)
- `OnInitSourceDocumentHeaderOnBeforePurchHeaderModify(var PurchaseHeader: Record "Purchase Header"; var WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var ModifyHeader: Boolean)` (integration)
- `OnAfterFindWhseShptLineForPurchLine(var WarehouseShipmentLine: Record "Warehouse Shipment Line"; var PurchaseLine: Record "Purchase Line")` (integration)
- `OnHandlePurchLineOnAfterCalcShouldModifyExpectedReceiptDate(WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var WarehouseShipmentLine: Record "Warehouse Shipment Line"; var PurchaseLine: Record "Purchase Line"; var ShouldModifyExpectedReceiptDate: Boolean)` (integration)
- `OnBeforePurchLineModify(var PurchaseLine: Record "Purchase Line"; WarehouseShipmentLine: Record "Warehouse Shipment Line"; var ModifyLine: Boolean; WhsePostParameters: Record "Whse. Post Parameters")` (integration)
- `OnAfterHandlePurchaseLine(var WhseShipmentLine: Record "Warehouse Shipment Line"; PurchHeader: Record "Purchase Header"; WhsePostParameters: Record "Whse. Post Parameters")` (integration)
- `OnPostSourceDocumentOnBeforePostPurchHeader(var PurchPost: Codeunit Microsoft.Purchases.Posting."Purch.-Post"; var PurchHeader: Record "Purchase Header"; var WhsePostParameters: Record "Whse. Post Parameters"; WhseShptHeader: Record "Warehouse Shipment Header"; var CounterSourceDocOK: Integer; var IsHandled: Boolean)` (integration)
- `OnPostSourceDocumentOnBeforePrintPurchReturnShipment(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)` (integration)
- `OnPostSourceDocumentOnBeforePrintPurchCreditMemo(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)` (integration)
- `OnAfterPurchPost(var WarehouseShipmentLine: Record "Warehouse Shipment Line"; PurchaseHeader: Record "Purchase Header"; WhsePosrParameters: Record "Whse. Post Parameters"; WhseShptHeader: Record "Warehouse Shipment Header")` (integration)
- `OnBeforeTryPostSourcePurchDocument(var PurchPost: Codeunit Microsoft.Purchases.Posting."Purch.-Post"; var PurchHeader: Record Microsoft.Purchases.Document."Purchase Header"; var IsHandled: Boolean)` (integration)
- `OnAfterTryPostSourcePurchDocument(var CounterSourceDocOK: Integer; var PurchPost: Codeunit Microsoft.Purchases.Posting."Purch.-Post"; var PurchHeader: Record Microsoft.Purchases.Document."Purchase Header"; Result: Boolean)` (integration)
- `OnAfterPostSourcePurchDocument(var CounterSourceDocOK: Integer; var PurchPost: Codeunit Microsoft.Purchases.Posting."Purch.-Post"; var PurchHeader: Record Microsoft.Purchases.Document."Purchase Header")` (integration)
- `OnBeforePostSourcePurchDocument(var PurchPost: Codeunit Microsoft.Purchases.Posting."Purch.-Post"; var PurchHeader: Record Microsoft.Purchases.Document."Purchase Header")` (integration)

## Event subscriptions

- OnGetSourceDocument subscribes to Codeunit "Whse.-Post Shipment" OnGetSourceDocumentOnElseCase
- OnInitSourceDocumentHeader subscribes to Codeunit "Whse.-Post Shipment" OnInitSourceDocumentHeader
- OnAfterInitSourceDocumentLines subscribes to Codeunit "Whse.-Post Shipment" OnAfterInitSourceDocumentLines
- OnPostSourceDocument subscribes to Codeunit "Whse.-Post Shipment" OnPostSourceDocument
- OnPrintDocuments subscribes to Codeunit "Whse.-Post Shipment" OnPrintDocuments

## Procedures

8 local procedures, no public ones.

## 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 90 "Purch.-Post"](../codeunit/90.md) (6 calls: `OnPostSourceDocument → SetCalledBy`, `OnPostSourceDocument → SetPreviewMode`, `OnPostSourceDocument → SetSuppressCommit`, …)
- [Codeunit 415 "Release Purchase Document"](../codeunit/415.md) (4 calls: `OnInitSourceDocumentHeader → (object)`, `OnInitSourceDocumentHeader → Reopen`, `OnInitSourceDocumentHeader → SetSkipCheckReleaseRestrictions`, …)

## Across versions

- Present in: BC25-30
- Changed (declaration) in: BC26

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: "Purch. Whse. Post Shipment")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
