---
id: object/table/5520
type: object
title: Table 5520 "Unplanned Demand"
summary: Table 5520 "Unplanned Demand" in Base Application (Microsoft.Inventory.Planning). 22 fields, 1 public procedures, 1 events. Present since at least BC23, still in BC30, changed in BC24-26, BC28.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: e653492ee7e98589835a434cc91d291ce749e223296b64211488c1ba0db6da59
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Planning/UnplannedDemand.Table.al
    title: src/Layers/W1/BaseApp/Inventory/Planning/UnplannedDemand.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 5520
name: Unplanned Demand
namespace: Microsoft.Inventory.Planning
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "26"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 22
  procedures: 2
  events: 1
  subscribers: 0
relations:
  out: 2
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 5
  calls: 0
  called_by: 0
  implements: 0
---

# Table 5520 "Unplanned Demand"

> Table 5520 "Unplanned Demand" in Base Application (Microsoft.Inventory.Planning). 22 fields, 1 public procedures, 1 events. Present since at least BC23, still in BC30, changed in BC24-26, BC28.

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

## Properties

| Property | Value |
|---|---|
| Caption | Unplanned Demand |
| DataClassification | CustomerContent |
| Permissions | TableData "Sales Header" = r, TableData Job = r |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Demand Type | Enum "Unplanned Demand Type" | — | enum [Enum 5520 "Unplanned Demand Type"](../enum/5520.md); not editable |
| 2 | Demand SubType | Option | — | OptionCaption: 0,1,2,3,4,5,6,7,8,9; not editable |
| 4 | Demand Order No. | Code[20] | — | not editable |
| 5 | Demand Line No. | Integer | — |  |
| 6 | Demand Ref. No. | Integer | — |  |
| 7 | Sell-to Customer No. | Code[20] | — | not editable |
| 8 | Description | Text[100] | — | not editable |
| 9 | Demand Date | Date | — | not editable |
| 10 | Status | Option | — | OptionCaption: 0,1,2,3,4,5,6,7,8,9,10; not editable |
| 13 | Item No. | Code[20] | — |  |
| 14 | Variant Code | Code[10] | — |  |
| 15 | Location Code | Code[10] | — |  |
| 16 | Quantity (Base) | Decimal | — |  |
| 17 | Level | Integer | — |  |
| 18 | Bin Code | Code[20] | — | TableRelation [Table 7354 "Bin"](../table/7354.md) (Bin.Code where("Location Code" = field("Location Code"), "Item Filter" = field("Item No."), "Variant Filter" = field("Variant Code"))) |
| 19 | Qty. per Unit of Measure | Decimal | — | not editable |
| 20 | Unit of Measure Code | Code[10] | — | TableRelation [Table 5404 "Item Unit of Measure"](../table/5404.md) ("Item Unit of Measure".Code where("Item No." = field("Item No."))) |
| 21 | Reserve | Boolean | — |  |
| 22 | Needed Qty. (Base) | Decimal | — |  |
| 23 | Special Order | Boolean | — |  |
| 24 | Purchasing Code | Code[10] | — |  |
| 25 | Drop Shipment | Boolean | — |  |

## Keys

- Key1: Demand Type, Demand SubType, Demand Order No., Demand Line No., Demand Ref. No. (clustered)
- Key2: Demand Date, Level
- Key3: Item No., Variant Code, Location Code, Demand Date

## Events published

- `OnValidateDemandOrderNoOnGetSourceFields(var UnplannedDemand: Record "Unplanned Demand")` (integration)
  - subscribers: [Codeunit 99000850 "Sales Line-Planning"](../codeunit/99000850.md) OnValidateDemandOrderNoOnGetSourceFields, [Codeunit 99000851 "Assembly Line-Planning"](../codeunit/99000851.md) OnValidateDemandOrderNoOnGetSourceFields, [Codeunit 99000852 "Job Planning Line-Planning"](../codeunit/99000852.md) OnValidateDemandOrderNoOnGetSourceFields, [Codeunit 99000853 "Service Line-Planning"](../codeunit/99000853.md) OnValidateDemandOrderNoOnGetSourceFields, [Codeunit 99000857 "Prod. Order Line-Planning"](../codeunit/99000857.md) OnValidateDemandOrderNoOnGetSourceFields

## Procedures

- `InitRecord(DemandLineNo: Integer; DemandRefNo: Integer; ItemNo: Code[20]; ItemDescription: Text[100]; VariantCode: Code[10]; LocationCode: Code[10]; BinCode: Code[20]; UoMCode: Code[10]; QtyPerUoM: Decimal; QtyBase: Decimal; DemandDate: Date)`

## Relations

- Unit of Measure Code: TableRelation [Table 5404 "Item Unit of Measure"](../table/5404.md)
- Bin Code: TableRelation [Table 7354 "Bin"](../table/7354.md)

## Pages and codeunits on this table

- [Codeunit 5520 "Get Unplanned Demand"](../codeunit/5520.md) (codeunit runs on it)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-26, BC28

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). 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: "table", object_name: "Unplanned Demand")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
