{"title":"Codeunit 5404 Lead-Time Management, extension points 29","url":"https://jonas-paprotka.de/ref/codeunit/5404-lead-time-management/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":5404,"name":"Lead-Time Management","app":"Base Application","url":"https://jonas-paprotka.de/ref/codeunit/5404-lead-time-management/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/codeunit/5404-lead-time-management/source/","path":"src/Layers/W1/BaseApp/Inventory/LeadTimeManagement.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:27":{"name":"Item","url":"https://jonas-paprotka.de/ref/table/27-item/"},"codeunit:99000855":{"name":"Planning-Get Parameters","url":"https://jonas-paprotka.de/ref/codeunit/99000855-planning-get-parameters/"},"table:5742":{"name":"Transfer Route","url":"https://jonas-paprotka.de/ref/table/5742-transfer-route/"},"codeunit:7600":{"name":"Calendar Management","url":"https://jonas-paprotka.de/ref/codeunit/7600-calendar-management/"}},"procs":[{"name":"PurchaseLeadTime","line":34,"kind":"procedure","params":4,"steps":[[40,"call","GetItem",1],[43,"ext","table",27,"FindItemVend",2],[46,"event","OnAfterPurchaseLeadTime",0]]},{"name":"ManufacturingLeadTime","line":49,"kind":"procedure","params":3,"steps":[[53,"ext","codeunit",99000855,"SetManualScheduling",1],[54,"ext","codeunit",99000855,"AtSKU",4],[56,"event","OnAfterManufacturingLeadTime",0]]},{"name":"WhseOutBoundHandlingTime","line":64,"kind":"procedure","params":1,"steps":[[73,"call","GetLocation",1]]},{"name":"WhseInBoundHandlingTime","line":77,"kind":"procedure","params":1,"steps":[[83,"event","OnBeforeWhseInBoundHandlingTime",1],[92,"call","GetLocation",1]]},{"name":"SafetyLeadTime","line":96,"kind":"procedure","params":3,"steps":[[100,"ext","codeunit",99000855,"SetManualScheduling",1],[101,"ext","codeunit",99000855,"AtSKU",4],[103,"event","OnAfterSafetyLeadTime",0]]},{"name":"GetPlannedEndingDate","line":107,"kind":"procedure","params":6,"steps":[[119,"event","OnBeforeGetPlannedEndingDate",1],[123,"ext","codeunit",99000855,"SetManualScheduling",1],[124,"ext","codeunit",99000855,"AtSKU",4],[127,"call","WhseInBoundHandlingTime",1],[128,"ext","table",5742,"GetTransferRoute",5],[130,"ext","table",5742,"CalcPlanReceiptDateBackward",6],[134,"event","OnGetPlannedEndingDateOnBeforeFormatDateFormula",0],[135,"call","FormatDateFormula",1],[136,"call","InternalLeadTimeDays",1],[136,"call","WhseInBoundHandlingTime",1],[143,"ext","codeunit",7600,"CalcDateBOC2",4]]},{"name":"GetPlannedStartingDate","line":147,"kind":"procedure","params":7,"steps":[[157,"event","OnBeforeGetPlannedStartingDate",1],[162,"ext","codeunit",99000855,"AtSKU",4],[164,"ext","table",5742,"GetTransferRoute",5],[166,"ext","table",5742,"GetShippingTime",5],[168,"ext","table",5742,"CalcPlanShipmentDateBackward",6],[173,"call","DateFormulaIsEmpty",1],[182,"ext","codeunit",7600,"CalcDateBOC2",4],[182,"call","InternalLeadTimeDays",1],[184,"event","OnAfterPlannedStartingDate",0]]},{"name":"GetPlannedEndingDate","line":188,"kind":"procedure","params":7,"steps":[[199,"event","OnBeforeGetPlannedEndingDateCalculaterForwardFromStartingDate",1],[204,"ext","codeunit",99000855,"AtSKU",4],[206,"ext","table",5742,"GetTransferRoute",5],[208,"ext","table",5742,"GetShippingTime",5],[210,"ext","table",5742,"CalcPlannedReceiptDateForward",6],[214,"call","DateFormulaIsEmpty",1],[223,"ext","codeunit",7600,"CalcDateBOC",4]]},{"name":"GetPlannedDueDate","line":227,"kind":"procedure","params":6,"steps":[[239,"event","OnBeforeGetPlannedDueDate",1],[243,"ext","codeunit",99000855,"SetManualScheduling",1],[244,"ext","codeunit",99000855,"AtSKU",4],[245,"event","OnGetPlannedDueDateOnBeforeFormatDateFormula",0],[246,"call","FormatDateFormula",1],[249,"call","WhseInBoundHandlingTime",1],[250,"ext","table",5742,"CalcReceiptDateForward",4],[253,"call","WhseInBoundHandlingTime",1],[259,"ext","codeunit",7600,"CalcDateBOC",4]]}]}