{"title":"Codeunit 311 Item-Check Avail., extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/311-item-check-avail/points/","author":"JOP-AL","license":"Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"codeunit","id":311,"name":"Item-Check Avail.","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/311-item-check-avail/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/311-item-check-avail/source/","path":"src/Layers/W1/BaseApp/Inventory/Availability/ItemCheckAvail.Codeunit.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:1511":{"name":"Notification Lifecycle Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/1511-notification-lifecycle-mgt/"},"table:904":{"name":"Assemble-to-Order Link","url":"https://jonas-paprotka.de/ref/table/904-assemble-to-order-link/"},"codeunit:905":{"name":"Assembly Line Management","url":"https://jonas-paprotka.de/ref/codeunit/905-assembly-line-management/"},"table:37":{"name":"Sales Line","url":"https://jonas-paprotka.de/ref/table/37-sales-line/"},"codeunit:5790":{"name":"Available to Promise","url":"https://jonas-paprotka.de/ref/codeunit/5790-available-to-promise/"},"codeunit:5402":{"name":"Unit of Measure Management","url":"https://jonas-paprotka.de/ref/codeunit/5402-unit-of-measure-management/"},"page:1872":{"name":"Item Availability Check","url":"https://jonas-paprotka.de/ref/page/1872-item-availability-check/"},"table:27":{"name":"Item","url":"https://jonas-paprotka.de/ref/table/27-item/"},"table:1518":{"name":"My Notifications","url":"https://jonas-paprotka.de/ref/table/1518-my-notifications/"}},"procs":[{"name":"ItemJnlCheckLine","line":62,"kind":"procedure","params":1,"steps":[[67,"event","OnBeforeItemJnlCheckLine",1],[71,"ext","codeunit",1511,"RecallNotificationsForRecordWithAdditionalContext",3],[72,"call","GetItemAvailabilityNotificationId",0],[73,"call","ItemJnlLineShowWarning",1],[74,"call","ShowAndHandleAvailabilityPage",1]]},{"name":"SalesLineCheck","line":77,"kind":"procedure","params":1,"steps":[[85,"event","OnBeforeSalesLineCheck",1],[89,"ext","codeunit",1511,"RecallNotificationsForRecordWithAdditionalContext",3],[90,"call","GetItemAvailabilityNotificationId",0],[91,"call","SalesLineShowWarning",1],[92,"call","ShowAndHandleAvailabilityPage",1],[94,"event","OnSalesLineCheckOnAfterSalesLineShowWarning",0],[97,"ext","table",904,"SalesLineCheckAvailShowWarning",3],[98,"call","ShowAsmWarningYesNo",2]]},{"name":"TransferLineCheck","line":101,"kind":"procedure","params":1,"steps":[[106,"event","OnBeforeTransferLineCheck",1],[109,"ext","codeunit",1511,"RecallNotificationsForRecordWithAdditionalContext",3],[110,"call","GetItemAvailabilityNotificationId",0],[111,"call","TransferLineShowWarning",1],[112,"call","ShowAndHandleAvailabilityPage",1]]},{"name":"JobPlanningLineCheck","line":116,"kind":"procedure","params":1,"steps":[[118,"ext","codeunit",1511,"RecallNotificationsForRecordWithAdditionalContext",3],[119,"call","GetItemAvailabilityNotificationId",0],[120,"call","JobPlanningLineShowWarning",1],[121,"call","ShowAndHandleAvailabilityPage",1]]},{"name":"AssemblyLineCheck","line":124,"kind":"procedure","params":1,"steps":[[126,"ext","codeunit",1511,"RecallNotificationsForRecordWithAdditionalContext",3],[127,"call","GetItemAvailabilityNotificationId",0],[128,"call","AsmOrderLineShowWarning",1],[129,"call","ShowAndHandleAvailabilityPage",1]]},{"name":"ShowAsmWarningYesNo","line":132,"kind":"procedure","params":2,"steps":[[136,"ext","codeunit",905,"ShowAvailability",3]]},{"name":"ItemJnlLineShowWarning","line":139,"kind":"procedure","params":1,"steps":[[143,"call","ShowWarningForThisItem",1],[154,"event","OnAfterItemJnlLineShowWarning",1],[159,"call","ShowWarning",9]]},{"name":"SalesLineShowWarning","line":171,"kind":"procedure","params":1,"steps":[[180,"event","OnBeforeSalesLineShowWarning",1],[186,"ext","table",37,"IsNonInventoriableItem",0],[188,"ext","table",37,"FullQtyIsForAsmToOrder",0],[190,"call","ShowWarningForThisItem",1],[201,"ext","codeunit",5790,"GetForwardPeriodEndDate",3],[212,"event","OnSalesLineShowWarningOnAfterFindingPrevSalesLineQtyWithinPeriod",1],[215,"ext","codeunit",5790,"SetChangedSalesLine",1],[224,"ext","table",37,"QtyBaseOnATO",0],[229,"event","OnSalesLineShowWarningOnBeforeShowWarning",1],[234,"call","ShowWarning",9]]},{"name":"ShowWarning","line":246,"kind":"procedure","params":9,"steps":[[255,"call","ConvertQty",1],[263,"call","SetFilterOnItem",5],[264,"call","Calculate",1],[267,"event","OnShowWarningOnAfterCalculate",1]]},{"name":"SetFilterOnItem","line":274,"kind":"procedure","access":"local","params":5,"steps":[[279,"event","OnBeforeSetFilterOnItem",1]]},{"name":"Calculate","line":294,"kind":"procedure","access":"local","params":1,"steps":[[299,"call","QtyAvailToPromise",2],[300,"call","EarliestAvailabilityDate",2],[305,"call","ConvertQty",1],[306,"call","ConvertQty",1],[315,"event","OnCalculateOnBeforeCalcInitialQtyAvailable",0],[321,"event","OnAfterCalculate",0]]},{"name":"QtyAvailToPromise","line":324,"kind":"procedure","access":"local","params":2,"steps":[[329,"event","OnBeforeQtyAvailToPromise",1],[333,"ext","codeunit",5790,"CalcQtyAvailabletoPromise",6],[333,"call","CheckAvailabilityDate",2],[335,"call","ConvertQty",1],[335,"ext","codeunit",5790,"CalcAvailableInventory",1],[336,"call","ConvertQty",1],[337,"call","ConvertQty",1],[337,"ext","codeunit",5790,"CalcReservedRequirement",1],[338,"call","ConvertQty",1],[339,"call","ConvertQty",1],[339,"ext","codeunit",5790,"CalcReservedReceipt",1]]},{"name":"EarliestAvailabilityDate","line":342,"kind":"procedure","access":"local","params":2,"steps":[[348,"call","ConvertQtyToBaseQty",1],[349,"call","ConvertQtyToBaseQty",1],[351,"ext","codeunit",5790,"CalcEarliestAvailabilityDate",8]]},{"name":"ConvertQty","line":356,"kind":"procedure","access":"local","params":1,"steps":[[360,"ext","codeunit",5402,"QtyRndPrecision",0],[361,"event","OnAfterConvertQty",0]]},{"name":"ConvertQtyToBaseQty","line":364,"kind":"procedure","access":"local","params":1,"steps":[[368,"ext","codeunit",5402,"QtyRndPrecision",0],[369,"event","OnAfterConvertQtyToBaseQty",0]]},{"name":"TransferLineShowWarning","line":372,"kind":"procedure","params":1,"steps":[[378,"event","OnBeforeTransferLineShowWarning",1],[382,"call","ShowWarningForThisItem",1],[399,"event","OnTransferLineShowWarningOnBeforeShowWarning",1],[404,"call","ShowWarning",9]]},{"name":"JobPlanningLineShowWarning","line":417,"kind":"procedure","params":1,"steps":[[422,"call","ShowWarningForThisItem",1],[437,"event","OnJobPlanningLineShowWarningOnAfterFindingPrevJobPlanningLineQtyWithinPeriod",1],[447,"event","OnJobPlanningLineShowWarningOnBeforeShowWarning",1],[452,"call","ShowWarning",9]]},{"name":"AsmOrderLineShowWarning","line":464,"kind":"procedure","params":1,"steps":[[469,"call","ShowWarningForThisItem",1],[487,"event","OnAsmOrderLineShowWarningOnAfterFindPreviousAssemblyOrderLineWithinPeriod",0],[491,"ext","codeunit",5790,"SetChangedAsmLine",1],[501,"event","OnAsmOrderLineShowWarningOnBeforeShowWarning",1],[506,"call","ShowWarning",9]]},{"name":"AsmOrderCalculate","line":518,"kind":"procedure","params":6,"steps":[[529,"call","SetFilterOnItem",5],[531,"call","QtyAvailToPromise",2],[544,"event","OnAsmOrderCalculateOnAfterFindingPrevAsmOrderCalculateWithinPeriod",1],[548,"call","ConvertQty",1],[551,"call","FetchCalculation2",5]]},{"name":"FetchCalculation","line":554,"kind":"procedure","params":11,"steps":[[558,"call","FetchCalculation2",5]]},{"name":"RaiseUpdateInterruptedError","line":574,"kind":"procedure","params":0,"steps":[[579,"event","OnBeforeRaiseUpdateInterruptedError",1]]},{"name":"ShowAndHandleAvailabilityPage","line":586,"kind":"procedure","params":1,"steps":[[603,"call","FetchCalculation",11],[607,"call","CreateAndSendNotification",12],[611,"event","OnAfterShowAndHandleAvailabilityPage",0]]},{"name":"ShowNotificationDetails","line":614,"kind":"procedure","params":1,"steps":[[618,"ext","page",1872,"InitializeFromNotification",1],[619,"ext","page",1872,"SetHeading",1]]},{"name":"CreateAndSendNotification","line":623,"kind":"procedure","access":"local","params":12,"steps":[[630,"event","OnBeforeCreateAndSendNotification",1],[641,"ext","page",1872,"PopulateDataOnNotification",13],[644,"ext","page",1872,"PopulateDataOnNotification",3],[645,"ext","codeunit",1511,"SendNotificationWithAdditionalContext",3],[646,"call","GetItemAvailabilityNotificationId",0]]},{"name":"ShowWarningForThisItem","line":650,"kind":"procedure","params":1,"steps":[[658,"event","OnBeforeShowWarningForThisItemOnBeforeItemGet",1],[667,"event","OnBeforeShowWarningForThisItem",1],[671,"ext","table",27,"IsNonInventoriableType",0],[674,"call","IsItemAvailabilityNotificationEnabled",1]]},{"name":"InvtDocCheckLine","line":692,"kind":"procedure","params":1,"steps":[[694,"ext","codeunit",1511,"RecallNotificationsForRecordWithAdditionalContext",3],[695,"call","GetItemAvailabilityNotificationId",0],[696,"call","ItemDocLineShowWarning",1],[697,"call","ShowAndHandleAvailabilityPage",1]]},{"name":"ItemDocLineShowWarning","line":700,"kind":"procedure","params":1,"steps":[[716,"event","OnItemDocLineShowWarningOnBeforeShowWarning",1],[721,"call","ShowWarning",9]]},{"name":"DeactivateNotification","line":738,"kind":"procedure","params":1,"steps":[[743,"call","OnInitializingNotificationWithDefaultState",0],[745,"ext","table",1518,"Disable",1],[745,"call","GetItemAvailabilityNotificationId",0]]},{"name":"IsItemAvailabilityNotificationEnabled","line":748,"kind":"procedure","access":"local","params":1,"steps":[[752,"ext","table",1518,"IsEnabledForRecord",2],[752,"call","GetItemAvailabilityNotificationId",0]]},{"name":"OnInitializingNotificationWithDefaultState","line":876,"kind":"procedure","access":"local","params":0,"steps":[[880,"ext","table",1518,"InsertDefaultWithTableNum",4],[880,"call","GetItemAvailabilityNotificationId",0]]}]}