---
id: object/codeunit/5772
type: object
title: Codeunit 5772 "Whse.-Purch. Release"
summary: Codeunit 5772 "Whse.-Purch. Release" in Base Application (Microsoft.Purchases.Document). 4 public procedures, 13 events. Present since at least BC23, still in BC30, changed in BC25, 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: f7e4bd88426868527ea4748fefeca0b5457e43e6311b2f695b4f8538a308029a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Purchases/Document/WhsePurchRelease.Codeunit.al
    title: src/Layers/W1/BaseApp/Purchases/Document/WhsePurchRelease.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: 5772
name: Whse.-Purch. Release
namespace: Microsoft.Purchases.Document
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
  - "27"
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: 2
  calls: 0
  called_by: 2
  implements: 0
---

# Codeunit 5772 "Whse.-Purch. Release"

> Codeunit 5772 "Whse.-Purch. Release" in Base Application (Microsoft.Purchases.Document). 4 public procedures, 13 events. Present since at least BC23, still in BC30, changed in BC25, BC27.

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

## Properties

| Property | Value |
|---|---|
| Permissions | TableData "Warehouse Request" = rimd |

## Events published

- `OnAfterCreateWhseRqst(var WhseRqst: Record "Warehouse Request"; var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; WhseType: Option Inbound,Outbound)` (integration)
- `OnAfterFilterWarehouseRequest(var WarehouseRequest: Record "Warehouse Request"; PurchaseHeader: Record "Purchase Header"; DocumentStatus: Option)` (integration)
- `OnBeforeCreateWhseRequest(var WhseRqst: Record "Warehouse Request"; var PurchHeader: Record "Purchase Header"; var PurchLine: Record "Purchase Line"; WhseType: Option Inbound,Outbound)` (integration)
- `OnAfterRelease(var PurchaseHeader: Record "Purchase Header")` (integration)
- `OnAfterReleaseSetFilters(var PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header")` (integration)
  - subscribers: [Codeunit 20550 "Subc. WhsePurchRelease Ext"](../codeunit/20550.md) OnAfterReleaseSetFilters
- `OnAfterReopen(var PurchaseHeader: Record "Purchase Header")` (integration)
- `OnBeforeRelease(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeReopen(var PurchaseHeader: Record "Purchase Header"; var WhseRqst: Record "Warehouse Request"; var IsHandled: Boolean)` (integration)
- `OnReleaseOnAfterCreateWhseRequest(PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseType: Option Inbound,Outbound)` (integration)
- `OnReleaseOnAfterSetWhseType(PurchaseHeader: Record "Purchase Header"; PurchaseLine: Record "Purchase Line"; var WarehouseRequestType: Enum "Warehouse Request Type")` (integration)
- `OnAfterShouldCreateWarehouseRequest(Location: Record Location; var ShouldCreate: Boolean)` (integration)
- `OnBeforeProcedureCreateWhseRequest(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseType: Enum "Warehouse Request Type"; var IsHandled: Boolean)` (integration)
- `OnReleaseOnBeforeCreateWhseRequest(var PurchaseLine: Record "Purchase Line"; var DoCreateWhseRequest: Boolean)` (integration)
  - subscribers: [Codeunit 20551 "Subc. WhsePostReceipt Ext"](../codeunit/20551.md) CreateWhseRequestForInventoriableItem_OnReleaseOnBeforeCreateWhseRequest

## Procedures

- `Release(PurchaseHeader: Record "Purchase Header")`
- `Reopen(PurchaseHeader: Record "Purchase Header")`
- `UpdateExternalDocNoForReleasedOrder(PurchaseHeader: Record "Purchase Header")`
- `CreateWarehouseRequest(var PurchaseHeader: Record "Purchase Header"; var PurchaseLine: Record "Purchase Line"; WhseType: Enum "Warehouse Request Type")`

Plus 2 local procedures.

## 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 415 "Release Purchase Document"](../codeunit/415.md) (2 calls: `Code → Release`, `Reopen → Reopen`)
- [Codeunit 90 "Purch.-Post"](../codeunit/90.md) (1 call: `FinalizePosting → Release`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25, 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: "Whse.-Purch. Release")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
