---
id: object/codeunit/5750
type: object
title: Codeunit 5750 "Whse.-Create Source Document"
summary: Codeunit 5750 "Whse.-Create Source Document" in Base Application (Microsoft.Warehouse.Request). 6 public procedures, 13 events. Present since at least BC23, still in BC30, changed in BC24-26.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  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: dcca24a6d65834cc4464e66e87d310097ddada47de2fdeb1ed3cefa5c20dc93d
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Warehouse/Request/WhseCreateSourceDocument.Codeunit.al
    title: src/Layers/W1/BaseApp/Warehouse/Request/WhseCreateSourceDocument.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: 5750
name: Whse.-Create Source Document
namespace: Microsoft.Warehouse.Request
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "26"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 19
  events: 13
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 1
  calls: 0
  called_by: 4
  implements: 0
---

# Codeunit 5750 "Whse.-Create Source Document"

> Codeunit 5750 "Whse.-Create Source Document" in Base Application (Microsoft.Warehouse.Request). 6 public procedures, 13 events. Present since at least BC23, still in BC30, changed in BC24-26.

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

## Events published

- `OnAfterCreateShptLine(var WarehouseShipmentLine: Record "Warehouse Shipment Line")` (integration)
- `OnAfterSetQtysOnRcptLine(var WarehouseReceiptLine: Record "Warehouse Receipt Line"; Qty: Decimal; QtyBase: Decimal)` (integration)
- `OnAfterWhseReceiptLineInsert(var WarehouseReceiptLine: Record "Warehouse Receipt Line")` (integration)
- `OnAfterWhseShptLineInsert(var WarehouseShipmentLine: Record "Warehouse Shipment Line")` (integration)
- `OnBeforeCreateReceiptLine(var WhseReceiptLine: Record "Warehouse Receipt Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeSetQtysOnShptLine(var WarehouseShipmentLine: Record "Warehouse Shipment Line"; var Qty: Decimal; var QtyBase: Decimal; var IsHandled: Boolean)` (integration)
  - subscribers: [Codeunit 20563 "Subc. WhsePostShipment Ext"](../codeunit/20563.md) HandleWipTransferOnBeforeSetQtysOnShptLine
- `OnBeforeUpdateReceiptLine(var WarehouseReceiptLine: Record "Warehouse Receipt Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateShptLine(var WarehouseShipmentLine: Record "Warehouse Shipment Line"; WarehouseShipmentHeader: Record "Warehouse Shipment Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeWhseReceiptLineInsert(var WarehouseReceiptLine: Record "Warehouse Receipt Line")` (integration)
- `OnBeforeWhseShptLineInsert(var WarehouseShipmentLine: Record "Warehouse Shipment Line")` (integration)
- `OnBeforeSetQtysOnRcptLine(var WarehouseReceiptLine: Record "Warehouse Receipt Line"; var Qty: Decimal; var QtyBase: Decimal; var IsHandled: Boolean)` (integration)
- `OnAfterUpdateReceiptLine(var WarehouseReceiptLine: Record "Warehouse Receipt Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header")` (integration)
- `OnAfterSetQtysOnShptLine(var WarehouseShipmentLine: Record "Warehouse Shipment Line"; var Qty: Decimal; var QtyBase: Decimal)` (integration)

## Procedures

- `CreateShipmentLine(var WarehouseShipmentLine: Record "Warehouse Shipment Line")` (internal)
- `SetQtysOnShptLine(var WarehouseShipmentLine: Record "Warehouse Shipment Line"; Qty: Decimal; QtyBase: Decimal)` (internal)
- `CreateReceiptLine(var WarehouseReceiptLine: Record "Warehouse Receipt Line")` (internal)
- `SetQtysOnRcptLine(var WarehouseReceiptLine: Record "Warehouse Receipt Line"; Qty: Decimal; QtyBase: Decimal)` (internal)
- `UpdateShipmentLine(var WarehouseShipmentLine: Record "Warehouse Shipment Line"; WarehouseShipmentHeader: Record "Warehouse Shipment Header")` (internal)
- `UpdateReceiptLine(var WarehouseReceiptLine: Record "Warehouse Receipt Line"; WarehouseReceiptHeader: Record "Warehouse Receipt Header")` (internal)

## Triggers

OnRun

## Called by

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 5991 "Sales Warehouse Mgt."](../codeunit/5991.md) (6 calls: `CreateShptLineFromSalesLine → CreateShipmentLine`, `CreateShptLineFromSalesLine → SetQtysOnShptLine`, `CreateShptLineFromSalesLine → UpdateShipmentLine`, …)
- [Codeunit 5992 "Purchases Warehouse Mgt."](../codeunit/5992.md) (6 calls: `FromPurchLine2ShptLine → CreateShipmentLine`, `FromPurchLine2ShptLine → SetQtysOnShptLine`, `FromPurchLine2ShptLine → UpdateShipmentLine`, …)
- [Codeunit 5993 "Transfer Warehouse Mgt."](../codeunit/5993.md) (6 calls: `FromTransLine2ShptLine → CreateShipmentLine`, `FromTransLine2ShptLine → SetQtysOnShptLine`, `FromTransLine2ShptLine → UpdateShipmentLine`, …)
- [Codeunit 5995 "Service Warehouse Mgt."](../codeunit/5995.md) (3 calls: `FromServiceLine2ShptLine → CreateShipmentLine`, `FromServiceLine2ShptLine → SetQtysOnShptLine`, `FromServiceLine2ShptLine → UpdateShipmentLine`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-26

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: "Whse.-Create Source Document")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
