---
id: object/codeunit/99000886
type: object
title: Codeunit 99000886 "Capable to Promise"
summary: Codeunit 99000886 "Capable to Promise" in Base Application (Microsoft.Inventory.Availability). 5 public procedures, 10 events. Present since at least BC23, still in BC30, changed in BC25, BC27, BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "30"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 171aaa1a950d4b10fa8cc643e6443ad543bb5399ba9dff1adef9dc3f1cc06650
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Availability/CapabletoPromise.Codeunit.al
    title: src/Layers/W1/BaseApp/Inventory/Availability/CapabletoPromise.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/12066
object_type: codeunit
object_id: 99000886
name: Capable to Promise
namespace: Microsoft.Inventory.Availability
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
  - "27"
  - "30"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 26
  events: 10
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 6
  called_by: 6
  implements: 0
---

# Codeunit 99000886 "Capable to Promise"

> Codeunit 99000886 "Capable to Promise" in Base Application (Microsoft.Inventory.Availability). 5 public procedures, 10 events. Present since at least BC23, still in BC30, changed in BC25, BC27, BC30.

Base Application · Microsoft.Inventory.Availability · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Availability/CapabletoPromise.Codeunit.al) · facts from BC29

## Events published

- `OnBeforeReqLineInsert(var RequisitionLine: Record "Requisition Line")` (integration)
- `OnBeforeReqLineModify(var RequisitionLine: Record "Requisition Line")` (integration)
- `OnBeforeGetCumulativeATP(ItemNo: Code[20]; VariantCode: Code[10]; LocationCode: Code[10]; DueDate: Date; UnitOfMeasureCode: Code[10]; PeriodType: Enum "Analysis Period Type"; var Result: Decimal; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckCompsCapableToPromise(RequisitionLine: Record "Requisition Line"; PeriodType: Enum "Analysis Period Type"; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeValidateCapableToPromise(var RequisitionLine: Record "Requisition Line"; ItemNo: Code[20]; VariantCode: Code[10]; LocationCode: Code[10]; NeededDate: Date; NeededQty: Decimal; UnitOfMeasure: Code[10]; PeriodType: Enum "Analysis Period Type"; var DueDateOfReqLine: Date; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeCalcCapableToPromiseDate(ItemNo: Code[20]; VariantCode: Code[10]; LocationCode: Code[10]; NeededDate: Date; NeededQty: Decimal; UnitOfMeasure: Code[10]; var LocOrderPromisingID: Code[20]; LocSourceLineNo: Integer; var LastValidLine: Integer; PeriodType: Enum "Analysis Line Type"; PeriodLengthFormula: DateFormula; var Result: Date; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckTransferShptCTP(RequisitionLine: Record "Requisition Line"; PeriodType: Enum "Analysis Period Type"; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnCalcCapableToPromiseDateOnAfterSetOrderPromisingParameters(ItemNo: Code[20]; VariantCode: Code[10]; LocationCode: Code[10]; PeriodLengthFormula: DateFormula; var OrderPromisingStart: Date; var OrderPromisingEnd: Date)` (integration)
- `OnBeforeReassignRefOrderNos(OrderPromisingID: Code[20]; var IsHandled: Boolean)` (integration, obsolete 27.0)
- `OnReassignRefOrderNosOnAfterRequisitionLineModifyAll(var RequisitionLine: Record "Requisition Line")` (integration, obsolete 27.0)

## Procedures

- `CalcCapableToPromiseDate(ItemNo: Code[20]; VariantCode: Code[10]; LocationCode: Code[10]; NeededDate: Date; NeededQty: Decimal; UnitOfMeasure: Code[10]; var LocOrderPromisingID: Code[20]; LocSourceLineNo: Integer; var LastValidLine: Integer; PeriodType: Enum "Analysis Line Type"; PeriodLengthFormula: DateFormula): Date`
- `RemoveReqLines(OrderPromisingID: Code[20]; SourceLineNo: Integer; LastGoodLineNo: Integer; FilterOnNonAccepted: Boolean)`
- `ReassignRefOrderNos(OrderPromisingID: Code[20])` (obsolete 27.0: Moved to codeunit ProdOrderAvailabilityMgt)
- `RunOnBeforeReassignRefOrderNos(OrderPromisingID: Code[20]; var IsHandled: Boolean)` (internal)
- `RunOnReassignRefOrderNosOnAfterRequisitionLineModifyAll(var RequisitionLine: Record "Requisition Line")` (internal)

Plus 11 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 5402 "Unit of Measure Management"](../codeunit/5402.md) (1 call: `GetCumulativeATP → QtyRndPrecision`)
- [Codeunit 5404 "Lead-Time Management"](../codeunit/5404.md) (1 call: `CreateReqLine → GetPlannedEndingDate`)
- [Codeunit 5790 "Available to Promise"](../codeunit/5790.md) (1 call: `GetCumulativeATP → CalcQtyAvailableToPromise`)
- [Codeunit 99000809 "Planning Line Management"](../codeunit/99000809.md) (1 call: `CreateReqLine → Calculate`)
- [Codeunit 99000840 "Plng. Component-Reserve"](../codeunit/99000840.md) (1 call: `BindToRequisition → BindToTracking`)
- [Page 456 "No. Series"](../page/456.md) (1 call: `SetOrderPromisingParameters → (object)`)

## Called by

- [Codeunit 4413 "SOA Shipment Date Mgt."](../codeunit/4413.md) (2 calls: `CalculateEarliestShipmentDate → CalcCapableToPromiseDate`, `CalculateEarliestShipmentDate → RemoveReqLines`)
- [Codeunit 6452 "Serv. Availability Mgt."](../codeunit/6452.md) (2 calls: `OnCalcCapableToPromiseLine → CalcCapableToPromiseDate`, `OnCalcCapableToPromiseLine → RemoveReqLines`)
- [Codeunit 99000871 "Job Planning Availability Mgt."](../codeunit/99000871.md) (2 calls: `OnCalcCapableToPromiseLine → CalcCapableToPromiseDate`, `OnCalcCapableToPromiseLine → RemoveReqLines`)
- [Codeunit 99000872 "Sales Availability Mgt."](../codeunit/99000872.md) (2 calls: `OnCalcCapableToPromiseLine → CalcCapableToPromiseDate`, `OnCalcCapableToPromiseLine → RemoveReqLines`)
- [Page 99000959 "Order Promising Lines"](../page/99000959.md) (1 call: `OnClosePage → RemoveReqLines`)
- [Table 37 "Sales Line"](../table/37.md) (1 call: `OnDelete → RemoveReqLines`)

## Recent changes

- 2026-10-02 [#12066 Bugs/remove asm inv mfg clean27 tags for wave2 2026](../../changes/bcapps/12066.md) (main, BC30, obsoletion)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25, BC27, BC30

## Deprecations

- procedure RunOnBeforeReassignRefOrderNos: guarded (#if not CLEAN27)
- procedure RunOnReassignRefOrderNosOnAfterRequisitionLineModifyAll: guarded (#if not CLEAN27)
- procedure OnBeforeReassignRefOrderNos: Pending 27.0 (#if not CLEAN27), "Moved to codeunit ProdOrderAvailabilityMgt"
- procedure OnReassignRefOrderNosOnAfterRequisitionLineModifyAll: Pending 27.0 (#if not CLEAN27), "Moved to codeunit ProdOrderAvailabilityMgt"
- procedure ReassignRefOrderNos: Pending 27.0 (#if not CLEAN27), "Moved to codeunit ProdOrderAvailabilityMgt"

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: "Capable to Promise")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
