---
id: object/codeunit/7308
type: object
title: Codeunit 7308 "Replenishment"
summary: Codeunit 7308 "Replenishment" in Base Application (Microsoft.Warehouse.Worksheet). 9 public procedures, 11 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: ce3d9a328b7f276f71e6df8986a2d867742d86da6eb719137c3553e40b910321
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Warehouse/Worksheet/Replenishment.Codeunit.al
    title: src/Layers/W1/BaseApp/Warehouse/Worksheet/Replenishment.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: 7308
name: Replenishment
namespace: Microsoft.Warehouse.Worksheet
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: 24
  events: 11
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 0
  implements: 0
---

# Codeunit 7308 "Replenishment"

> Codeunit 7308 "Replenishment" in Base Application (Microsoft.Warehouse.Worksheet). 9 public procedures, 11 events. Present since at least BC23, still in BC30, changed in BC24-26.

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

## Events published

- `OnBeforePickAccordingToFEFO(Location: Record Location; ItemNo: Code[20]; VariantCode: Code[10]; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnCreateWhseWkshLineOnBeforeInsertTempWhseWkshLine(var TempWhseWkshLine: Record "Whse. Worksheet Line" temporary; var ToBinContent: Record "Bin Content")` (integration)
- `OnFindReplenishmtBinOnAfterFromBinContentSetFilters(var FromBinContent: Record "Bin Content"; var ToBinContent: Record "Bin Content")` (integration)
- `OnInsertWhseWkshLineOnAfterWhseWkshLineInsert(var WhseWkshLine: Record "Whse. Worksheet Line")` (integration)
- `OnFindReplenishmtBinOnBeforeCalcQtyAvailToTakeBase(FromBinContent: Record "Bin Content"; var IsHandled: Boolean)` (integration)
- `OnBeforeInsertWhseWkshLine(var TempWhseWkshLine: Record "Whse. Worksheet Line" temporary; DoNotFillQtytoHandle: Boolean; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeFindReplenishmtBin(var TempWhseWkshLine: Record "Whse. Worksheet Line" temporary; ToBinContent: Record "Bin Content"; AllowBreakBulk: Boolean; var NextLineNo: Integer; WhseWkshTemplateName: Code[10]; WhseWkshName: Code[10]; LocationCode: Code[10]; DoNotFillQtytoHandle: Boolean; RemainQtyToReplenishBase: Decimal; var IsHandled: Boolean)` (integration)
- `OnReplenishBinOnAfterAssignExcludedQtyBase(ToBinContent: Record "Bin Content"; var ExcludedQtyBase: Decimal)` (integration)
- `OnBeforeReplenishBin(ToBinContent: Record "Bin Content"; var IsHandled: Boolean; RemainQtyToReplenishBase: Decimal; AllowBreakBulk: Boolean)` (integration)
- `OnFindBreakbulkBinOnAfterFromBinContentSetFilters(var FromBinContent: Record "Bin Content"; var ToBinContent: Record "Bin Content"; ItemUnitOfMeasure: Record "Item Unit of Measure"; var SkipItemUnitOfMeasure: Boolean)` (integration)
- `OnSetWhseWorksheetOnAfterWhseWorksheetLineSetFilters(var WhseWorksheetLine: Record "Whse. Worksheet Line")` (integration)

## Procedures

- `ReplenishBin(ToBinContent: Record "Bin Content"; AllowBreakBulk: Boolean)`
- `FindReplenishmtBin(ToBinContent: Record "Bin Content"; AllowBreakBulk: Boolean)`
- `SetRemainQtyToReplenishBase(NewRemainQtyToReplenishBase: Decimal)`
- `FindBreakbulkBin(ToBinContent: Record "Bin Content")`
- `CreateWhseWkshLine(ToBinContent: Record "Bin Content"; FromBinContent: Record "Bin Content"; MovementQtyBase: Decimal)`
- `GetTempWhseWkshLine(var TempWhseWorksheetLineOut: Record "Whse. Worksheet Line" temporary)`
- `InsertWhseWkshLine(): Boolean`
- `UseForReplenishment(FromBinContent: Record "Bin Content"): Boolean`
- `SetWhseWorksheet(WhseWkshTemplateName2: Code[10]; WhseWkshName2: Code[10]; LocationCode2: Code[10]; DoNotFillQtytoHandle2: Boolean)`

Plus 4 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 6500 "Item Tracking Management"](../codeunit/6500.md) (3 calls: `PickAccordingToFEFO → ExistingExpirationDate`, `PickAccordingToFEFO → GetWhseItemTrkgSetup`, `PickAccordingToFEFO → WhseExistingExpirationDate`)
- [Codeunit 5402 "Unit of Measure Management"](../codeunit/5402.md) (1 call: `CreateWhseWkshLine → QtyRndPrecision`)

## 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: "Replenishment")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
