{"title":"Codeunit 7308 Replenishment, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/7308-replenishment/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":7308,"name":"Replenishment","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/7308-replenishment/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/7308-replenishment/source/","path":"src/Layers/W1/BaseApp/Warehouse/Worksheet/Replenishment.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":{"table:7302":{"name":"Bin Content","url":"https://jonas-paprotka.de/ref/table/7302-bin-content/"},"table:7326":{"name":"Whse. Worksheet Line","url":"https://jonas-paprotka.de/ref/table/7326-whse-worksheet-line/"},"codeunit:5402":{"name":"Unit of Measure Management","url":"https://jonas-paprotka.de/ref/codeunit/5402-unit-of-measure-management/"},"codeunit:6500":{"name":"Item Tracking Management","url":"https://jonas-paprotka.de/ref/codeunit/6500-item-tracking-management/"}},"procs":[{"name":"ReplenishBin","line":35,"kind":"procedure","params":2,"steps":[[41,"event","OnBeforeReplenishBin",1],[48,"call","BinBlockedInbound",2],[52,"event","OnReplenishBinOnAfterAssignExcludedQtyBase",0],[53,"ext","table",7302,"NeedToReplenish",1],[56,"ext","table",7302,"CalcQtyToReplenish",1],[60,"call","FindReplenishmtBin",2]]},{"name":"FindReplenishmtBin","line":63,"kind":"procedure","params":2,"steps":[[72,"event","OnBeforeFindReplenishmtBin",1],[89,"event","OnFindReplenishmtBinOnAfterFromBinContentSetFilters",0],[99,"event","OnFindReplenishmtBinOnBeforeCalcQtyAvailToTakeBase",1],[101,"call","UseForReplenishment",1],[102,"ext","table",7302,"CalcQtyAvailToTake",1],[113,"call","CreateWhseWkshLine",3],[123,"call","FindBreakbulkBin",1]]},{"name":"FindBreakbulkBin","line":131,"kind":"procedure","params":1,"steps":[[159,"event","OnFindBreakbulkBinOnAfterFromBinContentSetFilters",0],[169,"call","UseForReplenishment",1],[170,"ext","table",7302,"CalcQtyAvailToTake",1],[180,"call","CreateWhseWkshLine",3]]},{"name":"CreateWhseWkshLine","line":190,"kind":"procedure","params":3,"steps":[[206,"validate",7326,"Variant Code"],[207,"validate",7326,"Quantity"],[207,"ext","codeunit",5402,"QtyRndPrecision",0],[216,"event","OnCreateWhseWkshLineOnBeforeInsertTempWhseWkshLine",0],[217,"write",7326,"Insert"]]},{"name":"InsertWhseWkshLine","line":228,"kind":"procedure","params":0,"steps":[[234,"event","OnBeforeInsertWhseWkshLine",1],[248,"call","PickAccordingToFEFO",2],[252,"write",7326,"Insert"],[253,"event","OnInsertWhseWkshLineOnAfterWhseWkshLineInsert",0]]},{"name":"BinBlockedInbound","line":260,"kind":"procedure","access":"local","params":2,"steps":[[262,"call","GetBin",2]]},{"name":"UseForReplenishment","line":268,"kind":"procedure","params":1,"steps":[[276,"call","GetBinType",1]]},{"name":"SetWhseWorksheet","line":298,"kind":"procedure","params":4,"steps":[[302,"write",7326,"DeleteAll"],[306,"event","OnSetWhseWorksheetOnAfterWhseWorksheetLineSetFilters",0]]},{"name":"PickAccordingToFEFO","line":319,"kind":"procedure","access":"local","params":2,"steps":[[328,"event","OnBeforePickAccordingToFEFO",1],[335,"ext","codeunit",6500,"GetWhseItemTrkgSetup",1],[339,"ext","codeunit",6500,"ExistingExpirationDate",5],[342,"ext","codeunit",6500,"WhseExistingExpirationDate",5]]}]}