Codeunit 5522 "Order Planning Mgt."
Base Application · Microsoft.Inventory.Requisition
Across versions
- BC23present
- BC241 events added
- BC255 procedures changed, 3 procedures added
- BC26unchanged
- BC274 events added, 1 procedures added
- BC285 procedures removed
- BC29unchanged
- BC301 procedures removed, 1 events removed
Neighbourhood 18 connected objects and pages
Base Application · Microsoft.Inventory.Requisition · BC23-30 · source at ea08af5e · facts from BC29
Events published
OnAfterTransformUnplannedDemandToRequisitionLines(var RequisitionLine: Record "Requisition Line")(integration)OnAvailQtyOnOtherLocationsOnAfterLocationSetFilters(RequisitionLine: Record "Requisition Line"; var Location: Record Location)(integration)OnBeforeCalcNextLineNo(var NextLineNo: Integer; var IsHandled: Boolean)(integration)OnBeforeIncreaseReqLineNo(var UnplannedDemand: Record "Unplanned Demand"; var ReqLine: Record "Requisition Line"; var IsHandled: Boolean)(integration)OnBeforeReqLineModify(var RequisitionLine: Record "Requisition Line"; RequisitionLine2: Record "Requisition Line"; ProdOrderComponent: Record Microsoft.Manufacturing.Document."Prod. Order Component")+ BC27 − BC27 − BC30 (integration, obsolete 27.0)OnBeforeRunGetUnplannedDemand(var UnplannedDemand: Record "Unplanned Demand"; var IsHandled: Boolean)(integration)OnCalcATPQtyOnBeforeCalcQtyAvailabletoPromise(var Item: Record Item)(integration)OnInsertAltSupplyLocationOnBeforeTempReqLineInsert(var RequisitionLine: Record "Requisition Line")(integration)OnInsertDemandHeaderOnAfterReqLineInsert(UnplannedDemand: Record "Unplanned Demand"; var ReqLine: Record "Requisition Line")(integration)OnInsertDemandHeaderOnBeforeReqLineInsert(UnplannedDemand: Record "Unplanned Demand"; var ReqLine: Record "Requisition Line")(integration)OnInsertDemandLinesOnAfterReqLineInsert(var RequisitionLine: Record "Requisition Line"; var UnplannedDemand: Record "Unplanned Demand")(integration)OnInsertDemandLinesOnBeforeReqLineInsert(var RequisitionLine: Record "Requisition Line"; var UnplannedDemand: Record "Unplanned Demand"; var IsHandled: Boolean)(integration)OnPrepareRequisitionRecordOnBeforeDeleteAll(var RequisitionLine: Record "Requisition Line")(integration)OnInsertDemandLinesOnCopyItemTracking(var RequisitionLine: Record "Requisition Line"; UnplannedDemand: Record "Unplanned Demand")+ BC25 (integration)- subscribers: Codeunit 99000850 “Sales Line-Planning” OnInsertDemandLinesOnCopyItemTracking, Codeunit 99000851 “Assembly Line-Planning” OnInsertDemandLinesOnCopyItemTracking, Codeunit 99000853 “Service Line-Planning” OnInsertDemandLinesOnCopyItemTracking, Codeunit 99000857 “Prod. Order Line-Planning” OnInsertDemandLinesOnCopyItemTracking
OnInsertDemandLinesOnBeforeFindUnplannedDemand(var TempUnplannedDemand: Record "Unplanned Demand" temporary; var RequisitionLine: Record "Requisition Line")+ BC24 (integration)OnInsertAltSupplyLocationOnAfterSelectSubstitution(var RequisitionLine: Record "Requisition Line"; var TempItemSub: Record "Item Substitution" temporary)+ BC27 (integration)- subscribers: Codeunit 99000857 “Prod. Order Line-Planning” OnInsertAltSupplyLocationOnAfterSelectSubstitution, Codeunit 99000867 “Mfg. Order Planning Mgt.” OnInsertAltSupplyLocationOnAfterSelectSubstitution
OnInsertAltSupplyLocationOnUpdateReqLine(var RequisitionLine: Record "Requisition Line"; var TempItemSub: Record "Item Substitution" temporary)+ BC27 (internal)- subscribers: Codeunit 99000867 “Mfg. Order Planning Mgt.” OnInsertAltSupplyLocationOnUpdateReqLine
OnSubstitutionPossibleOnAfterCheckReqLine(var RequisitionLine: Record "Requisition Line"; var ShouldExit: Boolean)+ BC27 (internal)- subscribers: Codeunit 99000867 “Mfg. Order Planning Mgt.” OnSubstitutionPossibleOnAfterCheckReqLine
Procedures
GetOrdersToPlan(var ReqLine: Record "Requisition Line")PlanSpecificSalesOrder(var ReqLine: Record "Requisition Line"; SalesOrderNo: Code[20])PlanSpecificJob(var ReqLine: Record "Requisition Line"; JobNo: Code[20])+ BC25SetTaskFilterOnReqLine(var ReqLine: Record "Requisition Line"; DemandLineNoFilter: Text)+ BC25PrepareRequisitionRecord(var RequisitionLine: Record "Requisition Line")DeleteLine(): BooleanCalcNeededQty(AvailableQty: Decimal; DemandQty: Decimal): DecimalCalcATPQty(ItemNo: Text[250]; VariantFilter: Text[250]; LocationFilter: Text[250]; DemandDate: Date): DecimalCalcATPEarliestDate(ItemNo: Text[250]; VariantFilter: Text[250]; LocationFilter: Text[250]; DemandDate: Date; Quantity: Decimal): DateSetDemandType(NewDemandType: Enum "Demand Order Source Type")+ BC25InsertAltSupplySubstitution(var ReqLine: Record "Requisition Line")SubstitutionPossible(ReqLine: Record "Requisition Line"): BooleanInsertAltSupplyLocation(var ReqLine: Record "Requisition Line")AvailQtyOnOtherLocations(ReqLine: Record "Requisition Line"): DecimalRunOnBeforeReqLineModify(var RequisitionLine: Record "Requisition Line"; RequisitionLine2: Record "Requisition Line"; ProdOrderComponent: Record Microsoft.Manufacturing.Document."Prod. Order Component")+ BC27 − BC30 (internal)
Plus 9 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 5520 “Get Unplanned Demand” (5 calls:
PlanSpecificJob → (object),PlanSpecificJob → SetIncludeMetDemandForSpecificJobNo,PlanSpecificSalesOrder → (object), …) - Codeunit 5701 “Item Subst.” (2 calls:
InsertAltSupplySubstitution → ErrorMessage,InsertAltSupplySubstitution → FindItemSubstitutions) - Codeunit 5790 “Available to Promise” (2 calls:
CalcATPEarliestDate → CalcEarliestAvailabilityDate,CalcATPQty → CalcQtyAvailableToPromise) - Codeunit 5402 “Unit of Measure Management” (1 call:
InsertAltSupplyLocation → QtyRndPrecision) - Codeunit 99000809 “Planning Line Management” (1 call:
InsertReqLineFromUnplannedDemand → Calculate) - Page 5524 “Get Alternative Supply” (1 call:
InsertAltSupplyLocation → (object)) - Page 5718 “Item Substitution Entries” (1 call:
InsertAltSupplySubstitution → (object))
Called by
- Page 5522 “Order Planning” (6 calls:
CalcEarliestShptDateAvailable → CalcATPEarliestDate,CalcPlan → GetOrdersToPlan,CalcPlan → SetDemandType, …) - Page 1328 “Purch. Order From Sales Order” (3 calls:
PlanForOrder → PlanSpecificJob,PlanForOrder → PlanSpecificSalesOrder,PlanForOrder → SetTaskFilterOnReqLine) - Codeunit 5520 “Get Unplanned Demand” (2 calls:
CalcNeededDemands → CalcATPQty,CalcNeededDemands → CalcNeededQty) - Codeunit 99000867 “Mfg. Order Planning Mgt.” (2 calls:
OnInsertAltSupplyLocationOnUpdateReqLine → (object),OnInsertAltSupplyLocationOnUpdateReqLine → CalcNeededQty) - Codeunit 1018 “Purchase Doc. From Job” (1 call:
CreatePurchaseOrder → PrepareRequisitionRecord) - Codeunit 1314 “Purch. Doc. From Sales Doc.” (1 call:
CreatePurchaseOrder → PrepareRequisitionRecord) - Table 246 “Requisition Line” (1 call:
ClearOrderPlanningWorksheet → PrepareRequisitionRecord)
Recent changes
- 2026-10-02 #12066 Bugs/remove asm inv mfg clean27 tags for wave2 2026 (main, BC30, obsoletion)
- 2026-09-02 #10716 [Main] [ALL-E] “Item tracking is defined for item 1000 in the Requisition Line. You must delete the existing item tracking before modifying or deleting the Requisition line” err when creating a Purchase Order from a Sales Order including DROP Shipment Bug 643358 (main, BC30, fix)
Deprecations
- procedure RunOnBeforeReqLineModify: guarded (#if not CLEAN27)
- procedure OnBeforeReqLineModify: Pending 27.0 (#if not CLEAN27), “Moved to codeunit MfgOrderPlanningMgt”
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: "Order Planning Mgt."), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.