---
id: object/codeunit/170
type: object
title: Codeunit 170 "Standard Codes Mgt."
summary: Codeunit 170 "Standard Codes Mgt." in Base Application (Microsoft.Utilities). 16 public procedures, 7 events, 16 event subscribers. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  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: eb57a30c95cfdd296c64061f8aaee223d0310afc9656a6f36fd2e20457b3d418
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Utilities/StandardCodesMgt.Codeunit.al
    title: src/Layers/W1/BaseApp/Utilities/StandardCodesMgt.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: 170
name: Standard Codes Mgt.
namespace: Microsoft.Utilities
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 44
  events: 7
  subscribers: 16
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 4
  implements: 0
---

# Codeunit 170 "Standard Codes Mgt."

> Codeunit 170 "Standard Codes Mgt." in Base Application (Microsoft.Utilities). 16 public procedures, 7 events, 16 event subscribers. Present since at least BC23, still in BC30.

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

## Events published

- `OnBeforeGetPurchRecurringLines(var PurchaseHeader: Record "Purchase Header")` (integration)
- `OnBeforeCanCreatePurchRecurringLines(var PurchaseHeader: Record "Purchase Header"; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeCanCreateSalesRecurringLines(var SalesHeader: Record "Sales Header"; var Result: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeGetSalesRecurringLines(var SalesHeader: Record "Sales Header")` (integration)
- `OnBeforeShowGetSalesRecurringLinesNotification(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeShowGetPurchRecurringLinesNotification(var PurchaseHeader: Record "Purchase Header"; var IsHandled: Boolean)` (integration)
- `OnBeforeCanGetPurchRecurringLines(var PurchaseHeader: Record "Purchase Header"; var ReturnValue: Boolean; var IsHandled: Boolean)` (integration)

## Event subscriptions

- OnAfterValidateSalesQuoteSellToCustomerName subscribes to Page "Sales Quote" OnAfterValidateEvent (Sell-to Customer Name)
- OnAfterValidateSalesQuoteSellToCustomerNo subscribes to Page "Sales Quote" OnAfterValidateEvent (Sell-to Customer No.)
- OnAfterValidateSalesOrderSellToCustomerName subscribes to Page "Sales Order" OnAfterValidateEvent (Sell-to Customer Name)
- OnAfterValidateSalesOrderSellToCustomerNo subscribes to Page "Sales Order" OnAfterValidateEvent (Sell-to Customer No.)
- OnAfterValidateSalesInvoiceSellToCustomerName subscribes to Page "Sales Invoice" OnAfterValidateEvent (Sell-to Customer Name)
- OnAfterValidateSalesInvoiceSellToCustomerNo subscribes to Page "Sales Invoice" OnAfterValidateEvent (Sell-to Customer No.)
- OnAfterValidateSalesCreditMemoSellToCustomerName subscribes to Page "Sales Credit Memo" OnAfterValidateEvent (Sell-to Customer Name)
- OnAfterValidateSalesCreditMemoSellToCustomerNo subscribes to Page "Sales Credit Memo" OnAfterValidateEvent (Sell-to Customer No.)
- OnAfterValidatePurchaseQuoteSellToVendorName subscribes to Page "Purchase Quote" OnAfterValidateEvent (Buy-from Vendor Name)
- OnAfterValidatePurchaseQuoteSellToVendorNo subscribes to Page "Purchase Quote" OnAfterValidateEvent (Buy-from Vendor No.)
- OnAfterValidatePurchaseInvoiceSellToVendorName subscribes to Page "Purchase Invoice" OnAfterValidateEvent (Buy-from Vendor Name)
- OnAfterValidatePurchaseInvoiceSellToVendorNo subscribes to Page "Purchase Invoice" OnAfterValidateEvent (Buy-from Vendor No.)
- OnAfterValidatePurchaseOrderSellToVendorName subscribes to Page "Purchase Order" OnAfterValidateEvent (Buy-from Vendor Name)
- OnAfterValidatePurchaseOrderSellToVendorNo subscribes to Page "Purchase Order" OnAfterValidateEvent (Buy-from Vendor No.)
- OnAfterValidatePurchaseCreditMemoSellToVendorName subscribes to Page "Purchase Credit Memo" OnAfterValidateEvent (Buy-from Vendor Name)
- OnAfterValidatePurchaseCreditMemoSellToVendorNo subscribes to Page "Purchase Credit Memo" OnAfterValidateEvent (Buy-from Vendor No.)

## Procedures

- `CheckCreatePurchRecurringLines(var PurchHeader: Record "Purchase Header"): Boolean`
- `CheckCreateSalesRecurringLines(SalesHeader: Record "Sales Header")`
- `SetSkipRecurringLines(SkipRecurringLinesNew: Boolean)`
- `CanCreatePurchRecurringLines(var PurchHeader: Record "Purchase Header"): Boolean`
- `GetSalesRecurringLines(SalesHeader: Record "Sales Header")`
- `GetPurchRecurringLines(PurchHeader: Record "Purchase Header")`
- `CheckShowSalesRecurringLinesNotification(var SalesHeader: Record "Sales Header")`
- `CheckShowPurchRecurringLinesNotification(var PurchaseHeader: Record "Purchase Header")`
- `ShowGetSalesRecurringLinesNotification(SalesHeader: Record "Sales Header")`
- `ShowGetPurchRecurringLinesNotification(PurchHeader: Record "Purchase Header")`
- `GetSalesRecurringLinesNotificationId(): Guid`
- `GetPurchRecurringLinesNotificationId(): Guid`
- `GetSalesRecurringLinesFromNotification(Notification: Notification)`
- `GetPurchRecurringLinesFromNotification(Notification: Notification)`
- `CanGetSalesRecurringLines(var SalesHeader: Record "Sales Header"): Boolean`
- `CanGetPurchRecurringLines(var PurchHeader: Record "Purchase Header"): Boolean`

Plus 5 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 1511 "Notification Lifecycle Mgt."](../codeunit/1511.md) (2 calls: `ShowGetPurchRecurringLinesNotification → SendNotificationWithAdditionalContext`, `ShowGetSalesRecurringLinesNotification → SendNotificationWithAdditionalContext`)

## Called by

- [Codeunit 87 "Blanket Sales Order to Order"](../codeunit/87.md) (1 call: `CreateSalesHeader → SetSkipRecurringLines`)
- [Codeunit 97 "Blanket Purch. Order to Order"](../codeunit/97.md) (1 call: `CreatePurchHeader → SetSkipRecurringLines`)
- [Table 36 "Sales Header"](../table/36.md) (1 call: `OnInsert → CheckCreateSalesRecurringLines`)
- [Table 38 "Purchase Header"](../table/38.md) (1 call: `OnInsert → CheckCreatePurchRecurringLines`)

## Across versions

- Present in: BC23-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: "codeunit", object_name: "Standard Codes Mgt.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
