---
id: object/codeunit/310
type: object
title: Codeunit 310 "No. Series"
summary: Codeunit 310 "No. Series" in Business Foundation (Microsoft.Foundation.NoSeries). 26 public procedures, 2 events. Introduced in BC24, still in BC30, changed in BC25.
tier: official
language: en
tags:
  - codeunit
  - business foundation
versions:
  introduced: "24"
  last_changed: "25"
  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: dd431749a1a25f5a45761d8fb3237fe5fefec771679d6883d0eecffade11600e
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Business%20Foundation/App/NoSeries/src/Single/NoSeries.Codeunit.al
    title: src/Business Foundation/App/NoSeries/src/Single/NoSeries.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 310
name: No. Series
namespace: Microsoft.Foundation.NoSeries
app: Business Foundation
extends: null
first_version: "24"
last_version: "30"
present_in:
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 28
  events: 2
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 2
  called_by: 0
  implements: 0
---

# Codeunit 310 "No. Series"

> Codeunit 310 "No. Series" in Business Foundation (Microsoft.Foundation.NoSeries). 26 public procedures, 2 events. Introduced in BC24, still in BC30, changed in BC25.

Business Foundation · Microsoft.Foundation.NoSeries · BC24-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Business%20Foundation/App/NoSeries/src/Single/NoSeries.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Events published

- `OnAfterSetNoSeriesCurrentLineFilters(NoSeries: Record "No. Series"; var NoSeriesLine: Record "No. Series Line"; IsDrillDown: Boolean)` (integration): Use this event to change the filters set on the No. Series Line record. These filters are used when viewing the No. Series page and when drilling down from a No. Series record.
- `OnSetNoSeriesLineFilters(var NoSeriesLine: Record "No. Series Line")` (integration): Use this event to set additional filters on the No. Series Line record. These filters are used when searching the No. Series.

## Procedures

- `GetNextNo(NoSeriesCode: Code[20]): Code[20]`: Get the next number in the No. Series. This function finds the first valid No. Series line based on WorkDate and calls the No. Series Line implementation to get the next number.
- `GetNextNo(NoSeriesCode: Code[20]; UsageDate: Date): Code[20]`: Get the next number in the No. Series. This function finds the first valid No. Series line based on UsageDate and calls the No. Series Line implementation to get the next number.
- `GetNextNo(var NoSeriesLine: Record "No. Series Line"; UsageDate: Date): Code[20]`: Get the next number in the No. Series. This function uses the specified No. Series line and calls the No. Series Line implementation to get the next number.
- `GetNextNo(NoSeriesCode: Code[20]; UsageDate: Date; HideErrorsAndWarnings: Boolean): Code[20]`: Get the next number in the No. Series. This function finds the first valid No. Series line based on UsageDate and calls the No. Series Line implementation to get the next number.
- `GetNextNo(var NoSeriesLine: Record "No. Series Line"; UsageDate: Date; HideErrorsAndWarnings: Boolean): Code[20]`: Get the next number in the No. Series. This function uses the specified No. Series line and calls the No. Series Line implementation to get the next number.
- `PeekNextNo(NoSeriesCode: Code[20]): Code[20]`: Get the next number in the No. Series, without incrementing the number. This function finds the first valid No. Series line based on UsageDate and calls the No. Series Line implementation to peek the next number.
- `PeekNextNo(NoSeriesCode: Code[20]; UsageDate: Date): Code[20]`: Get the next number in the No. Series, without incrementing the number. This function finds the first valid No. Series line based on UsageDate and calls the No. Series Line implementation to peek the next number.
- `PeekNextNo(var NoSeriesLine: Record "No. Series Line"; UsageDate: Date): Code[20]`: Get the next number in the No. Series, without incrementing the number. This function uses the specified No. Series line and calls the No. Series Line implementation to peek the next number.
- `GetLastNoUsed(NoSeriesCode: Code[20]): Code[20]`: Get the last number used in the No. Series.
- `GetLastNoUsed(NoSeriesLine: Record "No. Series Line"): Code[20]`: Get the last number used in the No. Series.
- `TestManual(NoSeriesCode: Code[20])`: Verifies that the No. Series allows using manual numbers.
- `TestManual(NoSeriesCode: Code[20]; DocumentNo: Code[20])`: Verifies that the No. Series allows using manual numbers and throws an error for the document no. if it does not.
- `IsManual(NoSeriesCode: Code[20]): Boolean`: Determines whether the No. Series allows using manual numbers.
- `TestAutomatic(NoSeriesCode: Code[20])`: Verifies that the No. Series is set up to automatically generate numbers.
- `IsAutomatic(NoSeriesCode: Code[20]): Boolean`: Determines whether numbers should automatically be generated from the No. Series.
- `HasRelatedSeries(NoSeriesCode: Code[20]): Boolean`: Returns true if the No. Series is related to one or more other No. Series.
- `TestAreRelated(DefaultNoSeriesCode: Code[20]; RelatedNoSeriesCode: Code[20])`: Verifies that the two No. Series are related.
- `AreRelated(DefaultNoSeriesCode: Code[20]; RelatedNoSeriesCode: Code[20]): Boolean`: Determines whether the two No. Series are related.
- `LookupRelatedNoSeries(OriginalNoSeriesCode: Code[20]; var NewNoSeriesCode: Code[20]): Boolean`: Opens a page to select a No. Series related to the OriginalNoSeriesCode (including the OriginalNoSeriesCode).
- `LookupRelatedNoSeries(OriginalNoSeriesCode: Code[20]; DefaultHighlightedNoSeriesCode: Code[20]; var NewNoSeriesCode: Code[20]): Boolean`: Opens a page to select a No. Series related to the OriginalNoSeriesCode (including the OriginalNoSeriesCode).
- `DrillDown(NoSeries: Record "No. Series")`: Drills down into the No Series Lines for the specified No. Series.
- `MayProduceGaps(NoSeriesLine: Record "No. Series Line"): Boolean`: Use this method to determine whether the specified No. Series line may produce gaps.
- `GetNoSeriesLine(var NoSeriesLine: Record "No. Series Line"; NoSeriesCode: Code[20]; UsageDate: Date; HideErrorsAndWarnings: Boolean): Boolean`: Get the No. Series line for the specified No. Series code and usage date.
- `SelectCurrentNoSeriesLine(NoSeries: Record "No. Series"; var NoSeriesLine: Record "No. Series Line"; ResetFilters: Boolean): Boolean`: Filters the No Series Lines and selects the currently applicable line based on the workdate.
- `IsNoSeriesInDateOrder(NoSeriesCode: Code[20]): Boolean`: Returns true if the number series has Date Order set.
- `IsNoSeriesInDateOrder(NoSeries: Record "No. Series"): Boolean`: Returns true if the number series has Date Order set.

## 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 304 "No. Series - Impl."](../codeunit/304.md) (13 calls: `AreRelated → AreRelated`, `GetLastNoUsed → GetLastNoUsed`, `GetNextNo → GetNextNo`, …)
- [Codeunit 305 "No. Series - Setup Impl."](../codeunit/305.md) (3 calls: `DrillDown → DrillDown`, `MayProduceGaps → MayProduceGaps`, `SelectCurrentNoSeriesLine → SelectCurrentNoSeriesLine`)

## Across versions

- Present in: BC24-30
- Changed (declaration) in: BC25

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