---
id: object/codeunit/5777
type: object
title: Codeunit 5777 "Whse. Validate Source Line"
summary: Codeunit 5777 "Whse. Validate Source Line" in Base Application (Microsoft.Warehouse.Request). 14 public procedures, 15 events. Present since at least BC23, still in BC30, changed in BC25-27, BC29.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "29"
  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: 64533c603db04ce25a4a952261c7c1bccd2b6ee6d6ac69906c93ccedda1b736a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Warehouse/Request/WhseValidateSourceLine.Codeunit.al
    title: src/Layers/W1/BaseApp/Warehouse/Request/WhseValidateSourceLine.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/8905
object_type: codeunit
object_id: 5777
name: Whse. Validate Source Line
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:
  - "25"
  - "26"
  - "27"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 34
  events: 15
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 9
  calls: 1
  called_by: 19
  implements: 0
---

# Codeunit 5777 "Whse. Validate Source Line"

> Codeunit 5777 "Whse. Validate Source Line" in Base Application (Microsoft.Warehouse.Request). 14 public procedures, 15 events. Present since at least BC23, still in BC30, changed in BC25-27, BC29.

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

## Events published

- `OnAfterItemLineVerifyChange(var NewItemJnlLine: Record "Item Journal Line"; var OldItemJnlLine: Record "Item Journal Line")` (integration)
- `OnAfterTransLineVerifyChange(var NewTransLine: Record "Transfer Line"; var OldTransLine: Record "Transfer Line")` (integration)
- `OnAfterTransLineDelete(var TransferLine: Record "Transfer Line")` (integration)
- `OnBeforeCheckQtyRemainingToBePickedForJob(NewJobJnlLine: Record "Job Journal Line"; QtyRemainingToBePicked: Decimal; var IsHandled: Boolean)` (integration)
- `OnBeforeTransLineVerifyChange(var NewTransLine: Record "Transfer Line"; var OldTransLine: Record "Transfer Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeVerifyFieldNotChanged(NewRecRef: RecordRef; OldRecRef: RecordRef; FieldNumber: Integer; var IsHandled: Boolean)` (integration)
- `OnBeforeWhseLinesExist(SourceType: Integer; SourceSubType: Option; SourceNo: Code[20]; SourceLineNo: Integer; SourceSublineNo: Integer; SourceQty: Decimal; var TableCaptionValue: Text[100]; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnTransLineCommonVerificationOnBeforeQuantityCheck(var OldTransferLine: Record "Transfer Line"; var NewTransferLine: Record "Transfer Line"; var IsHandled: Boolean)` (integration)
- `OnWhseLinesExistOnAfterWhseRcptLineSetFilters(var WhseRcptLine: Record "Warehouse Receipt Line"; SourceType: Integer; SourceSubType: Option; SourceNo: Code[20]; SourceLineNo: Integer; SourceQty: Decimal)` (integration)
- `OnWhseLinesExistOnAfterWhseShptLineSetFilters(var WhseShptLine: Record "Warehouse Shipment Line"; SourceType: Integer; SourceSubType: Option; SourceNo: Code[20]; SourceLineNo: Integer; SourceQty: Decimal; var IsHandled: Boolean)` (integration)
- `OnBeforeWhseWorkSheetLinesExist(SourceType: Integer; SourceSubType: Option; SourceNo: Code[20]; SourceLineNo: Integer; SourceSublineNo: Integer; SourceQty: Decimal; var TableCaptionValue: Text[100]; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnWhseLineExistOnBeforeCheckReceipt(SourceType: Integer; SourceSubType: Option; SourceQty: Decimal; var CheckReceipt: Boolean)` (integration)
  - subscribers: [Codeunit 5991 "Sales Warehouse Mgt."](../codeunit/5991.md) OnWhseLineExistOnBeforeCheckReceipt, [Codeunit 5992 "Purchases Warehouse Mgt."](../codeunit/5992.md) OnWhseLineExistOnBeforeCheckReceipt, [Codeunit 5993 "Transfer Warehouse Mgt."](../codeunit/5993.md) OnWhseLineExistOnBeforeCheckReceipt
- `OnWhseLineExistOnBeforeCheckShipment(SourceType: Integer; SourceSubType: Option; SourceQty: Decimal; var CheckShipment: Boolean)` (integration)
  - subscribers: [Codeunit 5991 "Sales Warehouse Mgt."](../codeunit/5991.md) OnWhseLineExistOnBeforeCheckShipment, [Codeunit 5992 "Purchases Warehouse Mgt."](../codeunit/5992.md) OnWhseLineExistOnBeforeCheckShipment, [Codeunit 5993 "Transfer Warehouse Mgt."](../codeunit/5993.md) OnWhseLineExistOnBeforeCheckShipment, [Codeunit 5995 "Service Warehouse Mgt."](../codeunit/5995.md) OnWhseLineExistOnBeforeCheckShipment
- `OnWhseLinesExistOnAfterWhseActivLineSetFilters(var WarehouseActivityLine: Record "Warehouse Activity Line"; SourceType: Integer; SourceSubType: Option; SourceNo: Code[20]; SourceLineNo: Integer; SourceQty: Decimal; var IsHandled: Boolean)` (integration)
- `OnItemLineVerifyChangeOnCheckEntryType(NewItemJnlLine: Record "Item Journal Line"; OldItemJnlLine: Record "Item Journal Line"; var LinesExist: Boolean; var QtyChecked: Boolean)` (integration)
  - subscribers: [Codeunit 5996 "Prod. Order Warehouse Mgt."](../codeunit/5996.md) OnItemLineVerifyChangeOnCheckEntryType, [Codeunit 5997 "Assembly Warehouse Mgt."](../codeunit/5997.md) OnItemLineVerifyChangeOnCheckEntryType

## Procedures

- `VerifyFieldNotChanged(NewRecRef: RecordRef; OldRecRef: RecordRef; FieldNumber: Integer)`
- `VerifyFieldNotChanged(NewRecRef: RecordRef; OldRecRef: RecordRef; FieldNumber: Integer; ErrorMessage: Text)`
- `FieldValueIsChanged(FirstRecordRef: RecordRef; SecondRecordRef: RecordRef; FieldNumber: Integer): Boolean` (internal)
- `TransLineVerifyChange(var NewTransLine: Record "Transfer Line"; var OldTransLine: Record "Transfer Line")`
- `TransLineDelete(var TransLine: Record "Transfer Line")`
- `WhseLinesExist(SourceType: Integer; SourceSubType: Option; SourceNo: Code[20]; SourceLineNo: Integer; SourceSublineNo: Integer; SourceQty: Decimal): Boolean`
- `WhseLinesExistWithTableCaptionOut(SourceType: Integer; SourceSubType: Option; SourceNo: Code[20]; SourceLineNo: Integer; SourceSublineNo: Integer; SourceQty: Decimal; var TableCaptionValueOut: Text[100]): Boolean`
- `WhseWorkSheetLinesExistForJobOrProdOrderComponent(SourceType: Integer; SourceSubType: Option; SourceNo: Code[20]; SourceLineNo: Integer; SourceSublineNo: Integer; SourceQty: Decimal): Boolean`
- `WhseWorkSheetLinesExist(SourceType: Integer; SourceSubType: Option; SourceNo: Code[20]; SourceLineNo: Integer; SourceSublineNo: Integer; SourceQty: Decimal): Boolean` (internal)
- `ItemLineVerifyChange(var NewItemJnlLine: Record "Item Journal Line"; var OldItemJnlLine: Record "Item Journal Line")`
- `JobJnlLineVerifyChangeForWhsePick(var NewJobJnlLine: Record "Job Journal Line"; var OldJobJnlLine: Record "Job Journal Line")` (internal)
- `IsWhsePickRequiredForJobJnlLine(var JobJournalLine: Record "Job Journal Line"): Boolean` (internal)
- `IsInventoryPickRequiredForJobJnlLine(var JobJournalLine: Record "Job Journal Line"): Boolean` (internal)
- `RaiseCannotBeDeletedErr(SourceTableCaption: Text)` (internal)

Plus 5 local procedures.

## Triggers

OnRun

## 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 5775 "Whse. Management"](../codeunit/5775.md) (1 call: `WhseLinesExist → SetSourceFilterForWhseRcptLine`)

## Called by

- [Codeunit 5996 "Prod. Order Warehouse Mgt."](../codeunit/5996.md) (13 calls: `OnItemLineVerifyChangeOnCheckEntryType → WhseLinesExist`, `OnItemLineVerifyChangeOnCheckEntryType → WhseWorkSheetLinesExist`, `ProdComponentDelete → RaiseCannotBeDeletedErr`, …)
- [Codeunit 5991 "Sales Warehouse Mgt."](../codeunit/5991.md) (4 calls: `SalesLineDelete → RaiseCannotBeDeletedErr`, `SalesLineDelete → WhseLinesExist`, `SalesLineVerifyChange → VerifyFieldNotChanged`, …)
- [Codeunit 5992 "Purchases Warehouse Mgt."](../codeunit/5992.md) (4 calls: `PurchaseLineDelete → RaiseCannotBeDeletedErr`, `PurchaseLineDelete → WhseLinesExist`, `PurchaseLineVerifyChange → VerifyFieldNotChanged`, …)
- [Codeunit 5995 "Service Warehouse Mgt."](../codeunit/5995.md) (4 calls: `ServiceLineDelete → RaiseCannotBeDeletedErr`, `ServiceLineDelete → WhseLinesExist`, `ServiceLineVerifyChange → VerifyFieldNotChanged`, …)
- [Codeunit 5997 "Assembly Warehouse Mgt."](../codeunit/5997.md) (4 calls: `AssemblyLineDelete → RaiseCannotBeDeletedErr`, `AssemblyLineDelete → WhseLinesExist`, `AssemblyLineVerifyChange → VerifyFieldNotChanged`, …)
- [Codeunit 5998 "Job Warehouse Mgt."](../codeunit/5998.md) (4 calls: `JobPlanningLineDelete → RaiseCannotBeDeletedErr`, `JobPlanningLineDelete → WhseLinesExist`, `JobPlanningLineVerifyChange → VerifyFieldNotChanged`, …)
- [Codeunit 1011 "Job Jnl.-Check Line"](../codeunit/1011.md) (2 calls: `CheckWhseQtyPicked → IsInventoryPickRequiredForJobJnlLine`, `CheckWhseQtyPicked → IsWhsePickRequiredForJobJnlLine`)
- [Codeunit 550 "VAT Rate Change Conversion"](../codeunit/550.md) (2 calls: `CheckPurchaseLinePartlyShipped → WhseLinesExist`, `CheckSalesLinePartlyShipped → WhseLinesExist`)
- [Table 5741 "Transfer Line"](../table/5741.md) (2 calls: `CheckWarehouse → WhseLinesExist`, `OnDelete → TransLineDelete`)
- [Table 99000853 "Inventory Profile"](../table/99000853.md) (2 calls: `ActiveInWarehouse → WhseLinesExist`, `ActiveInWarehouse → WhseWorkSheetLinesExistForJobOrProdOrderComponent`)
- [Codeunit 5704 "TransferOrder-Post Shipment"](../codeunit/5704.md) (1 call: `CheckWarehouse → WhseLinesExist`)
- [Codeunit 5705 "TransferOrder-Post Receipt"](../codeunit/5705.md) (1 call: `CheckWarehouse → WhseLinesExist`)
- [Codeunit 80 "Sales-Post"](../codeunit/80.md) (1 call: `GetShowErrorOnWarehouseCheck → WhseLinesExist`)
- [Codeunit 90 "Purch.-Post"](../codeunit/90.md) (1 call: `CheckWarehouse → WhseLinesExist`)
- [Codeunit 910 "Asm. Item Jnl.-Check Line"](../codeunit/910.md) (1 call: `CheckWarehouse → WhseLinesExist`)
- [Codeunit 99000760 "Mfg. Item Jnl. Check Line"](../codeunit/99000760.md) (1 call: `CheckWarehouse → WhseLinesExist`)
- [Table 37 "Sales Line"](../table/37.md) (1 call: `CheckWarehouse → WhseLinesExist`)
- [Table 39 "Purchase Line"](../table/39.md) (1 call: `CheckWarehouse → WhseLinesExist`)
- [Table 5902 "Service Line"](../table/5902.md) (1 call: `CheckWarehouse → WhseLinesExist`)

## Recent changes

- 2026-07-17 [#8905 [Master] Different source reference on reservation entries created directly from Job Planning Line and via a warehouse pick.](../../changes/bcapps/8905.md) (main, BC30, fix)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25-27, BC29

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