Codeunit 9500 "Sequence No. Mgt."
Base Application · Microsoft.Foundation.NoSeries
Across versions
- BC23-24present
- BC257 procedures added, 2 procedures removed
- BC267 procedures added, 1 procedures removed
- BC272 procedures added
- BC28unchanged
- BC292 events added
- BC30unchanged
Neighbourhood 60 connected objects and pages
Base Application · Microsoft.Foundation.NoSeries · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| SingleInstance | true |
| Permissions | tabledata “Sequence No. Preview State” = rid |
Events published
OnPreviewableLedgerEntry(TableNo: Integer; var IsPreviewable: Boolean)+ BC25 (integration)- subscribers: Codeunit 22 “Item Jnl.-Post Line” OnPreviewableLedgerEntry, Codeunit 5912 “ServLedgEntries-Post” OnPreviewableLedgerEntry, Codeunit 7301 “Whse. Jnl.-Register Line” OnPreviewableLedgerEntry
OnBeforeGetLastEntryNoFromTable(TableNo: Integer)+ BC29 (integration): Integration event raised at the beginning of GetLastEntryNoFromTable, before the table is opened. Allows extensions to remove filters (for example global dimension filters) that could affect the last entry number lookup.OnAfterGetLastEntryNoFromTable(TableNo: Integer)+ BC29 (integration): Integration event raised at the end of GetLastEntryNoFromTable, after the last entry number has been read. Allows extensions to reapply filters that were removed in OnBeforeGetLastEntryNoFromTable.
Procedures
ClearState()+ BC26: Clears allocations and other internal statesAllocateSeqNoBuffer(TableNo: Integer; NoOfEntries: Integer)+ BC27: Allocates sequence numbers for a given table ID. if the sequence does not exist, it will be created.GetNextSeqNo(TableNo: Integer): Integer: Returns the next buffered NumberSequence value for a given table ID. if the sequence does not exist, it will be created.GetCurrentSeqNo(TableNo: Integer): Integer+ BC26: Returns the current NumberSequence value for a given table ID. if the sequence does not exist, it will be created.ValidateSeqNo(TableNo: Integer)+ BC26: Ensures that the NumberSequence is not behind the last entry in the table. if the sequence does not exist, it will be created. The result will be cached for the current transaction. The cache can be cleared by calling ClearSequenceNoCheck.ClearSequenceNoCheck()+ BC26: Clears the cache that is used by procedure ValidateSeqNo(TableNo).RebaseSeqNo(TableNo: Integer): Restarts or recreates the NumberSequence for the specified Table ID.GetTableSequenceName(TableNo: Integer): Text+ BC25: Returns the name of the NumberSequence for the specified Table ID.GetTableSequenceName(PreviewMode: Boolean; TableNo: Integer): Text+ BC25: Returns the name of the NumberSequence for the specified Table ID. We have one sequence for preview and one for non-preview.StartPreviewMode()+ BC25 (internal)StopPreviewMode()+ BC25 (internal)SetPreviewMode(NewPreviewMode: Boolean)+ BC26 (internal)
Plus 7 local procedures.
Called by
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 6500 “Item Tracking Management” (3 calls:
CheckWhseItemTrkg → AllocateSeqNoBuffer,CreateWhseItemTrackingForReceipt → AllocateSeqNoBuffer,InsertWhseItemTrkgLines → AllocateSeqNoBuffer) - Table 1514 “Sent Notification Entry” (3 calls:
InsertRecord → GetNextSeqNo,InsertRecord → RebaseSeqNo,NewRecord → GetNextSeqNo) - Table 7312 “Warehouse Entry” (3 calls:
GetNextEntryNo → GetNextSeqNo,InsertRecord → GetNextSeqNo,InsertRecord → RebaseSeqNo) - Codeunit 1012 “Job Jnl.-Post Line” (2 calls:
RunWithCheck → ClearSequenceNoCheck,ValidateSequenceNo → ValidateSeqNo) - Codeunit 12 “Gen. Jnl.-Post Line” (2 calls:
RunWithCheck → ClearSequenceNoCheck,ValidateSequenceNo → ValidateSeqNo) - Codeunit 212 “Res. Jnl.-Post Line” (2 calls:
RunWithCheck → ClearSequenceNoCheck,ValidateSequenceNo → ValidateSeqNo) - Codeunit 22 “Item Jnl.-Post Line” (2 calls:
RunWithCheck → ClearSequenceNoCheck,ValidateSequenceNo → ValidateSeqNo) - Codeunit 5051 “SegManagement” (2 calls:
LogInteraction → GetNextSeqNo,LogSegment → GetNextSeqNo) - Codeunit 5763 “Whse.-Post Shipment” (2 calls:
Code → SetPreviewMode,OnRun → SetPreviewMode) - Codeunit 80 “Sales-Post” (2 calls:
CheckSalesLines → AllocateSeqNoBuffer,RunWithCheck → SetPreviewMode) - Codeunit 90 “Purch.-Post” (2 calls:
CheckPurchLines → AllocateSeqNoBuffer,RunWithCheck → SetPreviewMode) - Codeunit 99000891 “Mfg. Item Tracking Mgt.” (2 calls:
CreateWhseItemTrackingForProdOrderLine → AllocateSeqNoBuffer,InsertWhseItemTrkgLinesForProdOrderLine → AllocateSeqNoBuffer) - Table 5062 “Attachment” (2 calls:
InsertRecord → GetNextSeqNo,InsertRecord → RebaseSeqNo) - Table 5065 “Interaction Log Entry” (2 calls:
InsertRecord → GetNextSeqNo,InsertRecord → RebaseSeqNo) - Table 7313 “Warehouse Register” (2 calls:
InsertRecord → GetNextSeqNo,InsertRecord → RebaseSeqNo) - Codeunit 1021 “Job Jnl.-Post” (1 call:
OnRun → SetPreviewMode) - Codeunit 19 “Gen. Jnl.-Post Preview” (1 call:
PreviewStart → StopPreviewMode) - Codeunit 224 “EmplEntry-Apply Posted Entries” (1 call:
OnRun → SetPreviewMode) - Codeunit 226 “CustEntry-Apply Posted Entries” (1 call:
OnRun → SetPreviewMode) - Codeunit 227 “VendEntry-Apply Posted Entries” (1 call:
OnRun → SetPreviewMode) - Codeunit 23 “Item Jnl.-Post Batch” (1 call:
CheckLines → AllocateSeqNoBuffer) - Codeunit 231 “Gen. Jnl.-Post” (1 call:
OnRun → SetPreviewMode) - Codeunit 241 “Item Jnl.-Post” (1 call:
OnRun → SetPreviewMode) - Codeunit 442 “Sales-Post Prepayments” (1 call:
OnRun → SetPreviewMode) - Codeunit 444 “Purchase-Post Prepayments” (1 call:
OnRun → SetPreviewMode) - Codeunit 5636 “FA. Jnl.-Post” (1 call:
OnRun → SetPreviewMode) - Codeunit 5706 “TransferOrder-Post (Yes/No)” (1 call:
OnRun → SetPreviewMode) - Codeunit 5760 “Whse.-Post Receipt” (1 call:
OnRun → SetPreviewMode) - Codeunit 5853 “Invt. Doc.-Post (Yes/No)” (1 call:
OnRun → SetPreviewMode) - Codeunit 5884 “Phys. Invt. Order-Post” (1 call:
OnRun → SetPreviewMode) - Codeunit 5912 “ServLedgEntries-Post” (1 call:
InitServiceRegister → ClearSequenceNoCheck) - Codeunit 5940 “ServContractManagement” (1 call:
InitCodeUnit → ClearSequenceNoCheck) - Codeunit 5981 “Service-Post (Yes/No)” (1 call:
OnRun → SetPreviewMode) - Codeunit 699 “Exch. Rate Adjmt. Process” (1 call:
OnRun → SetPreviewMode) - Codeunit 7301 “Whse. Jnl.-Register Line” (1 call:
ValidateSequenceNo → ValidateSeqNo) - Codeunit 7304 “Whse. Jnl.-Register Batch” (1 call:
Code → AllocateSeqNoBuffer) - Codeunit 7323 “Whse.-Act.-Post (Yes/No)” (1 call:
OnRun → SetPreviewMode) - Codeunit 900 “Assembly-Post” (1 call:
OnRun → SetPreviewMode) - Codeunit 980 “Payment Registration Mgt.” (1 call:
OnRun → SetPreviewMode) - Table 169 “Job Ledger Entry” (1 call:
GetNextEntryNo → GetNextSeqNo) - Table 17 “G/L Entry” (1 call:
GetNextEntryNo → GetNextSeqNo) - Table 203 “Res. Ledger Entry” (1 call:
GetNextEntryNo → GetNextSeqNo) - Table 281 “Phys. Inventory Ledger Entry” (1 call:
GetNextEntryNo → GetNextSeqNo) - Table 32 “Item Ledger Entry” (1 call:
GetNextEntryNo → GetNextSeqNo) - Table 339 “Item Application Entry” (1 call:
GetNextEntryNo → GetNextSeqNo) - Table 343 “Item Application Entry History” (1 call:
GetNextEntryNo → GetNextSeqNo) - Table 45 “G/L Register” (1 call:
GetNextEntryNo → GetNextSeqNo) - Table 57 “G/L Transaction” (1 call:
GetNextTransactionNo → GetNextSeqNo) - Table 5802 “Value Entry” (1 call:
GetNextEntryNo → GetNextSeqNo) - Table 5832 “Capacity Ledger Entry” (1 call:
GetNextEntryNo → GetNextSeqNo) - and 7 more: data/code/graph/29/calls.json
Recent changes
- 2026-07-24 #9637 [Event Requests] Add integration events across base app and SMTP module (main, BC30, feature)
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: "Sequence No. Mgt."), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.