---
id: object/table/1853
type: object
title: Table 1853 "MS - Sales Forecast Setup"
summary: Table 1853 "MS - Sales Forecast Setup" in SalesAndInventoryForecast (Microsoft.Inventory.InventoryForecast). 15 fields, 8 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - table
  - salesandinventoryforecast
versions:
  introduced: "29"
  last_changed: null
  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: 8a5fc17ab04f988e4988f519c355b030ff3663178ec6b44d66d2e38902705432
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/SalesAndInventoryForecast/app/src/tables/MSSalesForecastSetup.Table.al
    title: src/Apps/W1/SalesAndInventoryForecast/app/src/tables/MSSalesForecastSetup.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/ui-extensions-sales-forecast
  objects: []
  features: []
  topics:
    - topic/business-central/development-and-administration/customize-business-central/customize-with-extensions
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 1853
name: MS - Sales Forecast Setup
namespace: Microsoft.Inventory.InventoryForecast
app: SalesAndInventoryForecast
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 15
  procedures: 12
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 1
  extended_by: 0
  event_subscribers: 0
  calls: 4
  called_by: 0
  implements: 0
---

# Table 1853 "MS - Sales Forecast Setup"

> Table 1853 "MS - Sales Forecast Setup" in SalesAndInventoryForecast (Microsoft.Inventory.InventoryForecast). 15 fields, 8 public procedures. Introduced in BC29, still in BC30.

SalesAndInventoryForecast · Microsoft.Inventory.InventoryForecast · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/SalesAndInventoryForecast/app/src/tables/MSSalesForecastSetup.Table.al) · facts from BC29

Learn documents this table through its pages: [Page 1853 "Sales Forecast Setup Card"](../page/1853.md) (1 Learn page).

## 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 | Primary Key | Code[10] | — | DataClassification SystemMetadata |
| 2 | Period Type | Option | Specifies the type of period that you want to see the forecast by. <small>via [Page 1853 "Sales Forecast Setup Card"](../page/1853.md)</small> | DataClassification CustomerContent |
| 4 | Stockout Warning Horizon | Integer | Specifies how far in the future you want to look for stockouts. The value you enter works together with the unit of time specified in the Period Type field to determine the horizon. <small>via [Page 1853 "Sales Forecast Setup Card"](../page/1853.md)</small> | DataClassification CustomerContent |
| 5 | Horizon | Integer | Specifies how many periods you want the forecast to cover. <small>via [Page 1853 "Sales Forecast Setup Card"](../page/1853.md)</small> | DataClassification CustomerContent |
| 6 | API URI | Text[250] | Specifies the API URI for the Azure Machine Learning instance. <small>via [Page 1853 "Sales Forecast Setup Card"](../page/1853.md)</small> | DataClassification CustomerContent |
| 7 | API Key ID | Guid | — | DataClassification CustomerContent |
| 8 | Timeout (seconds) | Integer | Specifies the number of seconds to wait before the call to Azure Machine Learning times out. <small>via [Page 1853 "Sales Forecast Setup Card"](../page/1853.md)</small> | DataClassification CustomerContent |
| 9 | Variance % | Decimal | Specifies the range of deviation, plus or minus, that you'll accept in the forecast. Lower percentages represent more accurate forecasts, and are typically between 20 and 40. Forecasts outside the range are considered inaccurate, and do not display. <small>via [Page 1853 "Sales Forecast Setup Card"](../page/1853.md)</small> | DataClassification CustomerContent |
| 10 | Expiration Period (Days) | Integer | Specifies the number of days until the forecast expires. <small>via [Page 1853 "Sales Forecast Setup Card"](../page/1853.md)</small> | DataClassification CustomerContent |
| 11 | Historical Periods | Integer | Specifies the number of historical periods from which to get data for the forecast. The length of the period is specified in the Period Type field. <small>via [Page 1853 "Sales Forecast Setup Card"](../page/1853.md)</small> | DataClassification CustomerContent |
| 12 | Last Run Completed | DateTime | Specifies the date and time of the last completed forecast update. You cannot change this value. <small>via [Page 1853 "Sales Forecast Setup Card"](../page/1853.md)</small> | not editable; DataClassification CustomerContent |
| 13 | Limit | Decimal | — | not editable; DataClassification CustomerContent |
| 14 | Processing Time | Decimal | — | not editable; DataClassification CustomerContent |
| 19 | Timeseries Model | Option | Specifies the algorithm to use for the time series analysis. <small>via [Page 1853 "Sales Forecast Setup Card"](../page/1853.md)</small> | DataClassification CustomerContent |
| 20 | Enabled | Boolean | Specifies if the forecasting feature is enabled. <small>via [Page 1853 "Sales Forecast Setup Card"](../page/1853.md)</small> | DataClassification CustomerContent |

## Keys

- Key1: Primary Key

## Procedures

- `GetSingleInstance()`
- `CheckURIAndKey()`
- `URIOrKeyEmpty(): Boolean`
- `GetUserDefinedAPIKeyAsSecret(): SecretText`
- `SetUserDefinedAPIKey(UserDefinedAPIKey: SecretText)`
- `GetAPIKeyAsSecret(): SecretText` (internal)
- `GetAPIUri(): Text[250]`
- `CheckEnabled()` (internal)

Plus 4 local procedures.

## Pages and codeunits on this table

- [Page 1853 "Sales Forecast Setup Card"](../page/1853.md) (source table)

## 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 1266 "Cryptography Management"](../codeunit/1266.md) (2 calls: `EnableEncryption → EnableEncryption`, `EnableEncryption → IsEncryptionEnabled`)
- [Codeunit 152 "User Permissions"](../codeunit/152.md) (1 call: `CheckEnabled → IsSuper`)
- [Codeunit 1820 "Customer Consent Mgt."](../codeunit/1820.md) (1 call: `CheckEnabled → ConsentToMicrosoftServiceWithAI`)
- [Codeunit 457 "Environment Information"](../codeunit/457.md) (1 call: `URIOrKeyEmpty → IsSaaS`)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

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