---
title: "Codeunit 5530 Calc. Item Availability"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/5530-calc-item-availability/
type: codeunit
id: 5530
name: "Calc. Item Availability"
app: "Base Application"
namespace: Microsoft.Inventory.Availability
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/5530-calc-item-availability/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 5530 Calc. Item Availability

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/5530-calc-item-availability/

| | |
| --- | --- |
| App | Base Application |
| Namespace | Microsoft.Inventory.Availability |
| Versions | 17-28 |
| Source file | Inventory/Availability/CalcItemAvailability.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| CalcNewInvtEventBuf | (var Record Item, Code[10], Boolean, Date, Boolean) | - | public | 17-28 | - | - |
| GetInvEventBuffer | (var Record Inventory Event Buffer) | - | public | 17-28 | - | - |
| GetDocumentEntries | (var Record Inventory Event Buffer, var Record Item) | - | public | 17-28 | - | - |
| InsertEntry | (var Record Inventory Event Buffer) | - | public | 17-28 | - | - |
| NextEntryNo | () | Integer | public | 17-28 | - | - |
| GetSourceReferences | (RecordId, Enum Transfer Direction, var Integer, var Integer, var Code[20], var Code[10], var Integer, var Integer) | Boolean | public | 17-28 | - | - |
| ShowDocument | (RecordId) | - | public | 17-28 | - | - |
| RunOnBeforeRunProductionOrderPage | (var Record Production Order, var Boolean) | - | internal | 27-28 | - | - |
| RunOnParentIsInPlanningOnAfterReqLineSetFilters | (var Record Requisition Line, var Record Prod. Order Component) | - | internal | 27-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterGetDocumentEntries | (var Record Inventory Event Buffer, var Record Item, var Integer) | 17-28 | - | - |
| Integration event | OnAfterGetPlanningLines | (var Record Inventory Event Buffer, Record Item, Record Requisition Line, RecordRef) | 17-28 | - | - |
| Integration event | OnAfterGetSourceReferences | (RecordId, Enum Transfer Direction, var Integer, var Integer, var Code[20], var Code[10], var Integer, var Integer, var Boolean) | 17-24 | - | - |
| Integration event | OnAfterShowDocument | (RecordId, var Boolean) | 17-24 | - | - |
| Integration event | OnBeforeTryGetQtyOnInventory | (var Record Inventory Event Buffer, var Record Item, var Boolean, var Boolean) | 17-28 | - | - |
| Integration event | OnGetPlanningLinesOnAfterReqLineSetFilters | (var Record Requisition Line, var Record Item) | 17-28 | - | - |
| Integration event | OnAfterGetAnticipatedDemand | (var Record Inventory Event Buffer, var Record Item, Code[10], Date, Boolean, Integer) | 18-28 | - | - |
| Integration event | OnGetBlanketSalesOrdersOnAfterAssignQtyReleased | (Record Sales Line, Decimal) | 18-28 | - | - |
| Integration event | OnGetBlanketSalesOrdersOnAfterTransferFromSalesBlanketOrder | (Record Sales Line, var Record Inventory Event Buffer) | 18-28 | - | - |
| Integration event | OnGetBlanketSalesOrdersOnAfterAdjustQtyReleasedFromInvtEventBuf | (Record Inventory Event Buffer) | 18-28 | - | - |
| Integration event | OnGetRemainingForecastOnAfterSetItemFilters | (var Record Item, Record Production Forecast Entry) | 18-28 | - | - |
| Integration event | OnGetRemainingForecastOAfterInvtEventBufSetFilters | (var Record Inventory Event Buffer, Record Production Forecast Entry) | 18-28 | - | - |
| Integration event | OnGetRemainingForecastOAfterInsertEntry | (var Record Inventory Event Buffer, var Record Item, Record Production Forecast Entry) | 18-28 | - | - |
| Integration event | OnGetRemainingForecastOnBeforeCalcForecastQuantityBase | (var Record Production Forecast Entry) | 18-28 | - | - |
| Integration event | OnGetRemainingForecastOnBeforeLoopOnAfterSetItemFilters | (var Record Item, Record Production Forecast Entry, Record Production Forecast Entry) | 18-28 | - | - |
| Integration event | OnTryGetQtyOnInventoryOnBeforeInsertEntry | (var Record Inventory Event Buffer, var Record Item Ledger Entry) | 18-28 | - | - |
| Integration event | OnBeforeRunSalesHeaderPage | (var Record Sales Header, var Boolean) | 20-28 | - | - |
| Integration event | OnBeforeRunPurchHeaderPage | (var Record Purchase Header, var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeRunProductionOrderPage | (var Record Production Order, var Boolean) | 21-28 | Pending 27.0 | Moved to codeunit ProdOrderAvailabilityMgt |
| Integration event | OnBeforeShowDocument | (var RecordRef) | 21-28 | - | - |
| Integration event | OnBeforeShowSalesShipmentHeader | (Record Sales Shipment Header, var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeShowSalesInvoiceHeader | (Record Sales Invoice Header, var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeShowSalesCrMemoHeader | (Record Sales Cr.Memo Header, var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeShowPurchRcptHeader | (Record Purch. Rcpt. Header, var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeShowPurchInvHeader | (Record Purch. Inv. Header, var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeShowPurchCrMemoHdr | (Record Purch. Cr. Memo Hdr., var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeShowReturnRcptHeader | (Record Return Receipt Header, var Boolean) | 21-28 | - | - |
| Integration event | OnBeforeShowReturnShptHeader | (Record Return Shipment Header, var Boolean) | 21-28 | - | - |
| Integration event | OnTryGetPurchOrderSupplyEntriesOnBeforeInsertEntry | (var Record Purchase Line, var Boolean) | 21-28 | - | - |
| Integration event | OnGetPlanningTransDemandOnAfterTransferReqLineSetFilters | (var Record Requisition Line, var Record Item) | 23-28 | - | - |
| Integration event | OnParentIsInPlanningOnAfterReqLineSetFilters | (var Record Requisition Line, var Record Prod. Order Component) | 23-28 | Pending 27.0 | Moved to codeunit ProdOrderAvailabilityMgt |
| Integration event | OnBeforeGetDocumentEntries | (var Record Inventory Event Buffer, var Record Item) | 25-28 | - | - |
| Integration event | OnAfterGetSourceReferences | (RecordId, Enum Transfer Direction, var Integer, var Integer, var Code[20], var Code[10], var Integer, var Integer, var Boolean, RecordRef) | 25-28 | - | - |
| Integration event | OnAfterShowDocument | (RecordId, var Boolean, RecordRef) | 25-28 | - | - |
| Integration event | OnParentIsInPlanning | (Record Inventory Event Buffer, var Enum Action Message Type, var Boolean) | 27-28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
