---
id: object/codeunit/311
type: object
title: Codeunit 311 "Item-Check Avail."
summary: Codeunit 311 "Item-Check Avail." in Base Application (Microsoft.Inventory.Availability). 23 public procedures, 28 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC24-26, BC28.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: c2b1db8337b37c59fbeb97bdc1ee1968d21a9d2182db11992e6bed1874230774
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Availability/ItemCheckAvail.Codeunit.al
    title: src/Layers/W1/BaseApp/Inventory/Availability/ItemCheckAvail.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/9118
object_type: codeunit
object_id: 311
name: Item-Check Avail.
namespace: Microsoft.Inventory.Availability
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"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 62
  events: 28
  subscribers: 1
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 4
  called_by: 20
  implements: 0
---

# Codeunit 311 "Item-Check Avail."

> Codeunit 311 "Item-Check Avail." in Base Application (Microsoft.Inventory.Availability). 23 public procedures, 28 events, 1 event subscribers. Present since at least BC23, still in BC30, changed in BC24-26, BC28.

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

## Properties

| Property | Value |
|---|---|
| Permissions | TableData "My Notifications" = rimd |

## Events published

- `OnAfterCalculate(var Item: Record Item; var InitialQtyAvailable: Decimal; OldItemNetChange: Decimal; QtyPerUnitOfMeasure: Decimal; var ContextInfo: Dictionary of [Text, Text])` (integration)
- `OnAfterConvertQty(ItemNo: Code[20]; Qty: Decimal; var QtyPerUnitOfMeasure: Decimal; var Result: Decimal)` (integration)
- `OnAfterConvertQtyToBaseQty(ItemNo: Code[20]; QtyBase: Decimal; var QtyPerUnitOfMeasure: Decimal; var Result: Decimal)` (integration)
- `OnAfterItemJnlLineShowWarning(var ItemJournalLine: Record "Item Journal Line"; var ItemNetChange: Decimal; var IsHandled: Boolean)` (integration)
- `OnBeforeItemJnlCheckLine(var ItemJournalLine: Record "Item Journal Line"; var Rollback: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeQtyAvailToPromise(var Item: Record Item; var CompanyInfo: Record "Company Information"; var InventoryQty: Decimal; var GrossReq: Decimal; var ReservedReq: Decimal; var OldItemNetResChange: Decimal; var SchedRcpt: Decimal; var ReservedRcpt: Decimal; var IsHandled: Boolean)` (integration)
- `OnBeforeCreateAndSendNotification(ItemNo: Code[20]; UnitOfMeasureCode: Code[20]; InventoryQty: Decimal; GrossReq: Decimal; ReservedReq: Decimal; SchedRcpt: Decimal; ReservedRcpt: Decimal; CurrentQuantity: Decimal; CurrentReservedQty: Decimal; TotalQuantity: Decimal; EarliestAvailDate: Date; RecordId: RecordID; LocationCode: Code[10]; ContextInfo: Dictionary of [Text, Text]; var Rollback: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeRaiseUpdateInterruptedError(var IsHandled: Boolean; ContextInfo: Dictionary of [Text, Text])` (integration)
- `OnBeforeSalesLineCheck(SalesLine: Record "Sales Line"; var Rollback: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeSalesLineShowWarning(SalesLine: Record "Sales Line"; var IsWarning: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeSetFilterOnItem(var Item: Record Item; ItemNo: Code[20]; ItemVariantCode: Code[10]; ItemLocationCode: Code[10]; ShipmentDate: Date; UseOrderPromise: Boolean; var IsHandled: Boolean; UnitOfMeasureCode: Code[10])` (integration)
- `OnBeforeShowWarningForThisItem(Item: Record Item; var ShowWarning: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeShowWarningForThisItemOnBeforeItemGet(ItemNo: Code[20]; var ShowWarning: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeTransferLineCheck(TransferLine: Record "Transfer Line"; var Rollback: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeTransferLineShowWarning(TransferLine: Record "Transfer Line"; var IsWarning: Boolean; var IsHandled: Boolean)` (integration)
- `OnAsmOrderLineShowWarningOnBeforeShowWarning(AssemblyLine: Record "Assembly Line"; var ContextInfo: Dictionary of [Text, Text]; OldAssemblyLine: Record "Assembly Line"; var OldItemNetChange: Decimal; var IsWarning: Boolean; var IsHandled: Boolean)` (integration)
- `OnItemDocLineShowWarningOnBeforeShowWarning(InvtDocLine: Record "Invt. Document Line"; var ContextInfo: Dictionary of [Text, Text]; var OldItemNetChange: Decimal; var IsWarning: Boolean; var IsHandled: Boolean)` (integration)
- `OnJobPlanningLineShowWarningOnBeforeShowWarning(JobPlanningLine: Record "Job Planning Line"; var ContextInfo: Dictionary of [Text, Text]; OldJobPlanningLine: Record "Job Planning Line"; var OldItemNetChange: Decimal; var IsWarning: Boolean; var IsHandled: Boolean)` (integration)
- `OnSalesLineShowWarningOnBeforeShowWarning(SalesLine: Record "Sales Line"; var ContextInfo: Dictionary of [Text, Text]; OldSalesLine: Record "Sales Line"; var IsWarning: Boolean; var IsHandled: Boolean; var OldItemNetChange: Decimal)` (integration)
- `OnTransferLineShowWarningOnBeforeShowWarning(TransLine: Record "Transfer Line"; var ContextInfo: Dictionary of [Text, Text]; OldTransLine: Record "Transfer Line"; var OldItemNetChange: Decimal; var IsWarning: Boolean; var IsHandled: Boolean)` (integration)
- `OnCalculateOnBeforeCalcInitialQtyAvailable(Item: Record Item; var SchedRcpt: Decimal; var ReservedRcpt: Decimal; var GrossReq: Decimal; var ReservedReq: Decimal; OldItemNetResChange: Decimal; NewItemNetResChange: Decimal; ContextInfo: Dictionary of [Text, Text]; var InventoryQty: Decimal)` (integration)
- `OnShowWarningOnAfterCalculate(ItemNo: Code[20]; InventoryQty: Decimal; ItemNetChange: Decimal; InitialQtyAvailable: Decimal; OldItemNetResChange: Decimal; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnAfterShowAndHandleAvailabilityPage(ItemNo2: Code[20]; UnitOfMeasureCode2: Code[10]; InventoryQty2: Decimal; GrossReq2: Decimal; ReservedReq2: Decimal; SchedRcpt2: Decimal; ReservedRcpt2: Decimal; CurrentQuantity2: Decimal; CurrentReservedQty2: Decimal; TotalQuantity2: Decimal; EarliestAvailDate2: Date; var Rollback: Boolean)` (integration)
- `OnSalesLineShowWarningOnAfterFindingPrevSalesLineQtyWithinPeriod(SalesLine: Record "Sales Line"; OldSalesLine: Record "Sales Line"; var IsHandled: Boolean)` (integration)
- `OnAsmOrderCalculateOnAfterFindingPrevAsmOrderCalculateWithinPeriod(AssemblyHeader: Record "Assembly Header"; OldAssemblyHeader: Record "Assembly Header"; var IsHandled: Boolean)` (integration)
- `OnJobPlanningLineShowWarningOnAfterFindingPrevJobPlanningLineQtyWithinPeriod(JobPlanningLine: Record "Job Planning Line"; OldJobPlanningLine: Record "Job Planning Line"; var IsHandled: Boolean)` (integration)
- `OnSalesLineCheckOnAfterSalesLineShowWarning(var SalesLine: Record "Sales Line"; var Rollback: Boolean)` (integration)
- `OnAsmOrderLineShowWarningOnAfterFindPreviousAssemblyOrderLineWithinPeriod(AssemblyLine: Record "Assembly Line"; OldAssemblyLine: Record "Assembly Line"; var ShouldCheckQty: Boolean; var OldItemNetChange: Decimal; var OldItemNetResChange: Decimal)` (integration)

## Event subscriptions

- OnInitializingNotificationWithDefaultState subscribes to Page "My Notifications" OnInitializingNotificationWithDefaultState

## Procedures

- `ItemJnlCheckLine(ItemJnlLine: Record "Item Journal Line"): Boolean`
- `SalesLineCheck(SalesLine: Record "Sales Line"): Boolean`
- `TransferLineCheck(TransLine: Record "Transfer Line"): Boolean`
- `JobPlanningLineCheck(JobPlanningLine: Record "Job Planning Line"): Boolean`
- `AssemblyLineCheck(AssemblyLine: Record "Assembly Line"): Boolean`
- `ShowAsmWarningYesNo(var AsmHeader: Record "Assembly Header"; var AsmLine: Record "Assembly Line"): Boolean`
- `ItemJnlLineShowWarning(ItemJnlLine: Record "Item Journal Line"): Boolean`
- `SalesLineShowWarning(SalesLine: Record "Sales Line"): Boolean`
- `ShowWarning(ItemNoArg: Code[20]; ItemVariantCodeArg: Code[10]; ItemLocationCodeArg: Code[10]; UnitOfMeasureCodeArg: Code[10]; QtyPerUnitOfMeasureArg: Decimal; NewItemNetChangeArg: Decimal; OldItemNetChangeArg: Decimal; ShipmentDateArg: Date; OldShipmentDateArg: Date): Boolean`
- `TransferLineShowWarning(TransLine: Record "Transfer Line"): Boolean`
- `JobPlanningLineShowWarning(JobPlanningLine: Record "Job Planning Line"): Boolean`
- `AsmOrderLineShowWarning(AssemblyLine: Record "Assembly Line"): Boolean`
- `AsmOrderCalculate(AssemblyHeader: Record "Assembly Header"; var InventoryQty2: Decimal; var GrossReq2: Decimal; var ReservedReq2: Decimal; var SchedRcpt2: Decimal; var ReservedRcpt2: Decimal)`
- `FetchCalculation(var ItemNo2: Code[20]; var UnitOfMeasureCode2: Code[10]; var InventoryQty2: Decimal; var GrossReq2: Decimal; var ReservedReq2: Decimal; var SchedRcpt2: Decimal; var ReservedRcpt2: Decimal; var CurrentQuantity2: Decimal; var CurrentReservedQty2: Decimal; var TotalQuantity2: Decimal; var EarliestAvailDate2: Date)`
- `RaiseUpdateInterruptedError()`
- `ShowAndHandleAvailabilityPage(RecordId: RecordID): Boolean`
- `ShowNotificationDetails(AvailabilityCheckNotification: Notification)`
- `ShowWarningForThisItem(ItemNo: Code[20]): Boolean`
- `InvtDocCheckLine(InvtDocLine: Record "Invt. Document Line"): Boolean`
- `ItemDocLineShowWarning(InvtDocLine: Record "Invt. Document Line"): Boolean`
- `GetItemAvailabilityNotificationId(): Guid`
- `DeactivateNotification(SetupNotification: Notification)`
- `SetUseOrderPromise(NewUseOrderPromise: Boolean)`

Plus 10 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 5790 "Available to Promise"](../codeunit/5790.md) (8 calls: `AsmOrderLineShowWarning → SetChangedAsmLine`, `EarliestAvailabilityDate → CalcEarliestAvailabilityDate`, `QtyAvailToPromise → CalcAvailableInventory`, …)
- [Codeunit 1511 "Notification Lifecycle Mgt."](../codeunit/1511.md) (7 calls: `AssemblyLineCheck → RecallNotificationsForRecordWithAdditionalContext`, `CreateAndSendNotification → SendNotificationWithAdditionalContext`, `InvtDocCheckLine → RecallNotificationsForRecordWithAdditionalContext`, …)
- [Codeunit 5402 "Unit of Measure Management"](../codeunit/5402.md) (2 calls: `ConvertQty → QtyRndPrecision`, `ConvertQtyToBaseQty → QtyRndPrecision`)
- [Codeunit 905 "Assembly Line Management"](../codeunit/905.md) (1 call: `ShowAsmWarningYesNo → ShowAvailability`)

## Called by

- [Codeunit 1508 "Notification Lifecycle Handler"](../codeunit/1508.md) (11 calls: `OnAssemblyLineUpdateQuantityRecallItemNotif → GetItemAvailabilityNotificationId`, `OnAssemblyLineUpdateTypeRecallItemNotif → GetItemAvailabilityNotificationId`, `OnAssemblyLineUpdateUnitOfMeasureCodeRecallItemNotif → GetItemAvailabilityNotificationId`, …)
- [Codeunit 6620 "Copy Document Mgt."](../codeunit/6620.md) (7 calls: `CheckAsmOrderAvailability → RaiseUpdateInterruptedError`, `CheckATOItemAvailable → RaiseUpdateInterruptedError`, `CheckATOItemAvailable → ShowAsmWarningYesNo`, …)
- [Codeunit 6453 "Serv. Item Check Avail."](../codeunit/6453.md) (6 calls: `RaiseUpdateInterruptedError → RaiseUpdateInterruptedError`, `ServiceInvLineCheck → GetItemAvailabilityNotificationId`, `ServiceInvLineCheck → ShowAndHandleAvailabilityPage`, …)
- [Table 901 "Assembly Line"](../table/901.md) (6 calls: `CheckItemAvailable → AssemblyLineCheck`, `CheckItemAvailable → RaiseUpdateInterruptedError`, `ShowAvailabilityWarning → AssemblyLineCheck`, …)
- [Codeunit 246 "Item Jnl.-Explode BOM"](../codeunit/246.md) (2 calls: `OnRun → ItemJnlCheckLine`, `OnRun → RaiseUpdateInterruptedError`)
- [Codeunit 5701 "Item Subst."](../codeunit/5701.md) (2 calls: `ItemAssemblySubstGet → AssemblyLineCheck`, `ItemSubstGet → SalesLineCheck`)
- [Codeunit 63 "Sales-Explode BOM"](../codeunit/63.md) (2 calls: `OnRun → RaiseUpdateInterruptedError`, `OnRun → SalesLineCheck`)
- [Codeunit 6460 "Serv. Notification Mgt."](../codeunit/6460.md) (2 calls: `OnServiceLineUpdateQtyTo0RecallItemNotif → GetItemAvailabilityNotificationId`, `OnServiceLineUpdateTypeRecallItemNotif → GetItemAvailabilityNotificationId`)
- [Codeunit 87 "Blanket Sales Order to Order"](../codeunit/87.md) (2 calls: `CheckSalesLineItemAvailability → RaiseUpdateInterruptedError`, `CheckSalesLineItemAvailability → SalesLineCheck`)
- [Codeunit 905 "Assembly Line Management"](../codeunit/905.md) (2 calls: `ShowAssemblyAvailability → AsmOrderCalculate`, `UpdateAssemblyLines → RaiseUpdateInterruptedError`)
- [Table 1003 "Job Planning Line"](../table/1003.md) (2 calls: `CheckItemAvailable → JobPlanningLineCheck`, `CheckItemAvailable → RaiseUpdateInterruptedError`)
- [Table 210 "Job Journal Line"](../table/210.md) (2 calls: `CheckItemAvailable → ItemJnlCheckLine`, `CheckItemAvailable → RaiseUpdateInterruptedError`)
- [Table 36 "Sales Header"](../table/36.md) (2 calls: `CheckItemAvailabilityInLines → RaiseUpdateInterruptedError`, `CheckItemAvailabilityInLines → SalesLineCheck`)
- [Table 37 "Sales Line"](../table/37.md) (2 calls: `CheckItemAvailable → RaiseUpdateInterruptedError`, `CheckItemAvailable → SalesLineCheck`)
- [Table 5741 "Transfer Line"](../table/5741.md) (2 calls: `CheckItemAvailable → RaiseUpdateInterruptedError`, `CheckItemAvailable → TransferLineCheck`)
- [Table 83 "Item Journal Line"](../table/83.md) (2 calls: `CheckItemAvailable → ItemJnlCheckLine`, `CheckItemAvailable → RaiseUpdateInterruptedError`)
- [Codeunit 5857 "Copy Invt. Document Mgt."](../codeunit/5857.md) (1 call: `CheckItemAvailable → InvtDocCheckLine`)
- [Codeunit 99000872 "Sales Availability Mgt."](../codeunit/99000872.md) (1 call: `ShowItemAvailabilityFromSalesLine → SalesLineCheck`)
- [Table 5851 "Invt. Document Line"](../table/5851.md) (1 call: `CheckItemAvailable → InvtDocCheckLine`)
- [Table 904 "Assemble-to-Order Link"](../table/904.md) (1 call: `AsmReopenIfReleased → RaiseUpdateInterruptedError`)

## Recent changes

- 2026-07-07 [#9118 Bugs/master GitHub event batch 1745](../../changes/bcapps/9118.md) (main, BC30, fix)

## Across versions

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

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