---
id: object/codeunit/9999
type: object
title: Codeunit 9999 "Upgrade Tag"
summary: Codeunit 9999 "Upgrade Tag" in System Application (System.Upgrade). 15 public procedures, 3 events. Present since at least BC23, still in BC30, changed in BC26.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "26"
  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: f2b20e028da708791e41f72ae3d360e36328a73d92335977df46a2ca69148992
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Upgrade%20Tags/src/UpgradeTag.Codeunit.al
    title: src/System Application/App/Upgrade Tags/src/UpgradeTag.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: 9999
name: Upgrade Tag
namespace: System.Upgrade
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "26"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 18
  events: 3
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 57
  calls: 1
  called_by: 87
  implements: 0
---

# Codeunit 9999 "Upgrade Tag"

> Codeunit 9999 "Upgrade Tag" in System Application (System.Upgrade). 15 public procedures, 3 events. Present since at least BC23, still in BC30, changed in BC26.

System Application · System.Upgrade · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Upgrade%20Tags/src/UpgradeTag.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |
| Permissions | tabledata "Upgrade Tags" = rimd |

## Events published

- `OnGetPerCompanyUpgradeTags(var PerCompanyUpgradeTags: List of [Code[250]])` (integration): Use this event if you want to add upgrade tag for PerCompany upgrade method for a new company.
  - subscribers: [Codeunit 104059 "Serv. Upgrade BaseApp"](../codeunit/104059.md) RegisterPerCompanyTags, [Codeunit 104066 "SMTP Connector - Upgrade"](../codeunit/104066.md) RegisterPerCompanyTags, [Codeunit 1567 "System Upgrade Privacy Notices"](../codeunit/1567.md) RegisterPerCompanyTags, [Codeunit 1597 "Email Upgrade"](../codeunit/1597.md) RegisterPerCompanyTags, [Codeunit 1688 "Email Logging Upgrade"](../codeunit/1688.md) RegisterPerCompanyTags, [Codeunit 1712 "Upg. Tag Def. Bank Deposits"](../codeunit/1712.md) RegisterPerCompanyTags, [Codeunit 1808 "Assisted Setup Upgrade Tag"](../codeunit/1808.md) RegisterPerCompanyTags, [Codeunit 1933 "Performance Profiler Installer"](../codeunit/1933.md) RegisterPerCompanyTags, [Codeunit 1998 "Guided Experience Upgrade Tag"](../codeunit/1998.md) RegisterPerCompanyTags, [Codeunit 20119 "AMC Bank Upgrade"](../codeunit/20119.md) RegisterPerCompanyTags, [Codeunit 20570 "Subc. Upgrade Tag Def. Ext."](../codeunit/20570.md) RegisterPerCompanyTags, [Codeunit 22201 "Upgrade"](../codeunit/22201.md) RegisterPerCompanyTags, [Codeunit 30106 "Shpfy Upgrade Mgt."](../codeunit/30106.md) RegisterPerCompanyTags, [Codeunit 3305 "Payables Agent Upgrade"](../codeunit/3305.md) RegisterPerCompanyUpgradeTags, [Codeunit 332 "No. Series Upgrade Tags"](../codeunit/332.md) RegisterPerCompanyTags, [Codeunit 36957 "PowerBI Upgrade"](../codeunit/36957.md) RegisterPerCompanyTags, [Codeunit 37215 "PEPPOL30 Upgrade"](../codeunit/37215.md) OnGetPerCompanyUpgradeTags, [Codeunit 3907 "Retention Policy Installer"](../codeunit/3907.md) RegisterPerCompanyTags, [Codeunit 3999 "Reten. Pol. Install - BaseApp"](../codeunit/3999.md) RegisterPerCompanyUpgradeTags, [Codeunit 40010 "Cloud Mig. Upgrade"](../codeunit/40010.md) RegisterUpgradeTags, and 25 more
- `OnGetPerDatabaseUpgradeTags(var PerDatabaseUpgradeTags: List of [Code[250]])` (integration): Use this event if you want to add upgrade tag for PerDatabase upgrade method for a new company.
  - subscribers: [Codeunit 3305 "Payables Agent Upgrade"](../codeunit/3305.md) RegisterPerDatabaseUpgradeTags, [Codeunit 4326 "Agent Upgrade"](../codeunit/4326.md) OnGetPerDatabaseUpgradeTags, [Codeunit 4589 "SOA Upgrade"](../codeunit/4589.md) RegisterPerDatabaseUpgradeTags, [Codeunit 6978 "Upgrade Expense Agent Setup"](../codeunit/6978.md) RegisterPerDatabaseUpgradeTags, [Codeunit 7781 "Copilot Telemetry Upgrade"](../codeunit/7781.md) RegisterUpgradeTags, [Codeunit 8356 "MCP Upgrade"](../codeunit/8356.md) RegisterUpgradeTags, [Codeunit 9058 "Plan Upgrade Tag"](../codeunit/9058.md) RegisterPerDatabaseTags, [Codeunit 9222 "User Settings Upgrade"](../codeunit/9222.md) RegisterPerDatabaseUpgradeTags, [Codeunit 9992 "Upgrade Tag - Tags"](../codeunit/9992.md) RegisterPerDatabaseUpgradeTags, [Codeunit 9998 "Upgrade Tag Definitions"](../codeunit/9998.md) RegisterPerDatabaseTags
- `OnSetAllUpgradeTags(NewCompanyName: Text; var SkipSetAllUpgradeTags: Boolean)` (integration): Use this event if you want to skip or run logic when we register all tags for a company.
  - subscribers: [Codeunit 4008 "Hybrid BC Management"](../codeunit/4008.md) HandleSetAllUpgradeTags, [Codeunit 4021 "Hybrid BC Last Management"](../codeunit/4021.md) HandleSetAllUpgradeTags

## Procedures

- `HasUpgradeTag(Tag: Code[250]): Boolean`: Verifies if the upgrade tag exists.
- `HasUpgradeTag(Tag: Code[250]; TagCompanyName: Code[30]): Boolean`: Verifies if the upgrade tag exists.
- `HasDatabaseUpgradeTag(Tag: Code[250]): Boolean`: Verifies if the database upgrade tag exists.
- `SetDatabaseUpgradeTag(NewTag: Code[250])`: Sets the upgrade tag for database upgrades.
- `SetUpgradeTag(NewTag: Code[250])`: Sets the upgrade tag.
- `SetSkippedUpgrade(ExistingTag: Code[250]; SkipUpgrade: Boolean)`: Sets the upgrade tag to skipped.
- `SetSkippedUpgrade(ExistingTag: Code[250]; TagCompanyName: Code[30]; SkipUpgrade: Boolean)`: Sets the upgrade tag to skipped.
- `HasUpgradeTagSkipped(ExistingTag: Code[250]; TagCompanyName: Code[30]): Boolean`: Check if the upgrade tag is skipped.
- `SetAllUpgradeTags()`: This method should be used to set all upgrade tags in a new company. The method is called from codeunit 2 - Company Initialize.
- `SetAllUpgradeTags(NewCompanyName: Code[30])`: This method should be used to set all upgrade tags in a new company.
- `CopyUpgradeTags(FromCompanyName: Code[30]; ToCompanyName: Code[30])`: This method should be used to copy all upgrade tags from a company to another company.
- `GetPerCompanyUpgradeTags(var PerCompanyUpgradeTags: List of [Code[250]])`: With this method you get all the upgrade tags by company in a list.
- `GetPerDatabaseUpgradeTags(var PerDatabaseUpgradeTags: List of [Code[250]])`: With this method you get all the upgrade tags by database in a list.
- `BackupUpgradeTags(): Integer`: This function is used for cloud migration to backup upgrade tags before cloud migration is triggered. Using the function if cloud migration is not enabled will throw an error.
- `RestoreUpgradeTagsFromBackup(BackupId: Integer; RestoreMissingTagsOnly: Boolean)`: This function is used to restore Upgrade tags after cloud migration. Using the function if cloud migration is not enabled will throw an error.

## 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 9996 "Upgrade Tag Impl."](../codeunit/9996.md) (10 calls: `BackupUpgradeTags → BackupUpgradeTags`, `CopyUpgradeTags → CopyUpgradeTags`, `HasDatabaseUpgradeTag → HasDatabaseUpgradeTag`, …)

## Called by

- [Codeunit 104000 "Upgrade - BaseApp"](../codeunit/104000.md) (248 calls: `AddPowerBIWorkspaces → HasUpgradeTag`, `AddPowerBIWorkspaces → SetUpgradeTag`, `CheckLedgerEntriesMoveFromRecordIDToSystemId → HasUpgradeTag`, …)
- [Codeunit 104030 "Upgrade Plan Permissions"](../codeunit/104030.md) (22 calls: `AddFeatureDataUpdatePermissions → HasUpgradeTag`, `AddFeatureDataUpdatePermissions → SetUpgradeTag`, `CreateBCAdminPermissions → HasUpgradeTag`, …)
- [Codeunit 9057 "Plan Upgrade"](../codeunit/9057.md) (22 calls: `AddBCAdmin → HasUpgradeTag`, `AddBCAdmin → SetUpgradeTag`, `AddD365Admin → HasUpgradeTag`, …)
- [Codeunit 104059 "Serv. Upgrade BaseApp"](../codeunit/104059.md) (16 calls: `CopyItemSalesBlockedToServiceBlocked → HasUpgradeTag`, `CopyItemSalesBlockedToServiceBlocked → SetUpgradeTag`, `EnableDeleteFiledContractsWithRelatedMainContract → HasUpgradeTag`, …)
- [Codeunit 4589 "SOA Upgrade"](../codeunit/4589.md) (16 calls: `AddBillingTypeToCapability → HasUpgradeTag`, `AddBillingTypeToCapability → SetUpgradeTag`, `AddDailyEmailLimit → HasUpgradeTag`, …)
- [Codeunit 104051 "Update VAT Date Field"](../codeunit/104051.md) (10 calls: `OnUpgradePerCompany → HasUpgradeTag`, `OnUpgradePerCompany → SetUpgradeTag`, `UpdateGLEntries → HasUpgradeTag`, …)
- [Codeunit 3305 "Payables Agent Upgrade"](../codeunit/3305.md) (10 calls: `AddBillingTypeToCapability → HasUpgradeTag`, `AddBillingTypeToCapability → SetUpgradeTag`, `RegisterCapability → HasUpgradeTag`, …)
- [Codeunit 6978 "Upgrade Expense Agent Setup"](../codeunit/6978.md) (10 calls: `UpgradeClearStaleCopyCompanyState → HasUpgradeTag`, `UpgradeClearStaleCopyCompanyState → SetUpgradeTag`, `UpgradeEnableCommunicationDefault → HasUpgradeTag`, …)
- [Codeunit 8356 "MCP Upgrade"](../codeunit/8356.md) (8 calls: `EnableApiToolsOnExistingConfigurations → HasDatabaseUpgradeTag`, `EnableApiToolsOnExistingConfigurations → SetUpgradeTag`, `UpgradeMCPAPIToolVersion → HasDatabaseUpgradeTag`, …)
- [Codeunit 1999 "Guided Experience Upgrade"](../codeunit/1999.md) (6 calls: `InsertSpotlightTour → HasUpgradeTag`, `InsertSpotlightTour → SetUpgradeTag`, `UpdateTourDescriptions → HasUpgradeTag`, …)
- [Codeunit 22201 "Upgrade"](../codeunit/22201.md) (6 calls: `FixGLEntryReviewLogSetReviewedAt → HasUpgradeTag`, `FixGLEntryReviewLogSetReviewedAt → SetUpgradeTag`, `FixGLEntryReviewLogWithReviewAmountZeroWithDataTransfer → HasUpgradeTag`, …)
- [Codeunit 6616 "FS Install"](../codeunit/6616.md) (6 calls: `UpgradeAssistedSetup → HasUpgradeTag`, `UpgradeAssistedSetup → SetUpgradeTag`, `UpgradeConnectionSetup → HasUpgradeTag`, …)
- [Codeunit 1597 "Email Upgrade"](../codeunit/1597.md) (5 calls: `RegisterPerCompanyTags → HasUpgradeTag`, `SetDefaultEmailMaxConcurrencyLimit → HasUpgradeTag`, `SetDefaultEmailMaxConcurrencyLimit → SetUpgradeTag`, …)
- [Codeunit 7048 "Set Price Line Source Group"](../codeunit/7048.md) (5 calls: `OnRun → HasUpgradeTag`, `UpdatePriceListLineStatus → HasUpgradeTag`, `UpdatePriceListLineStatus → SetUpgradeTag`, …)
- [Codeunit 104040 "Upgrade Profiles V2"](../codeunit/104040.md) (4 calls: `OnUpgradePerCompany → HasUpgradeTag`, `OnUpgradePerCompany → SetUpgradeTag`, `UpgradeProfileReferences → HasUpgradeTag`, …)
- [Codeunit 104055 "Upgrade - Error Message"](../codeunit/104055.md) (4 calls: `UpdateErrorMessageDescription → HasUpgradeTag`, `UpdateErrorMessageDescription → SetUpgradeTag`, `UpdateErrorMessageRegisterDescription → HasUpgradeTag`, …)
- [Codeunit 1567 "System Upgrade Privacy Notices"](../codeunit/1567.md) (4 calls: `UpgradeMicrosoftLearnPrivacyNotice → HasUpgradeTag`, `UpgradeMicrosoftLearnPrivacyNotice → SetUpgradeTag`, `UpgradeTeamsPrivacyNotice → HasUpgradeTag`, …)
- [Codeunit 7238 "Master Data Mgt. Upgrade"](../codeunit/7238.md) (4 calls: `UpgradeJobQueueEntryFrequencies → HasUpgradeTag`, `UpgradeJobQueueEntryFrequencies → SetUpgradeTag`, `UpgradeSynchTableCaptions → HasUpgradeTag`, …)
- [Codeunit 1081 "Fin. Report Default Upgrade"](../codeunit/1081.md) (3 calls: `SetUpgradeTag → SetSkippedUpgrade`, `SetUpgradeTag → SetUpgradeTag`, `UpdateData → HasUpgradeTag`)
- [Codeunit 1688 "Email Logging Upgrade"](../codeunit/1688.md) (3 calls: `RegisterPerCompanyTags → HasUpgradeTag`, `UpgradeEmailLogging → HasUpgradeTag`, `UpgradeEmailLogging → SetUpgradeTag`)
- [Codeunit 1933 "Performance Profiler Installer"](../codeunit/1933.md) (3 calls: `AddRetentionPolicyAllowedTables → HasUpgradeTag`, `AddRetentionPolicyAllowedTables → SetUpgradeTag`, `RegisterPerCompanyTags → HasUpgradeTag`)
- [Codeunit 7105 "Upgrade Exp. Report VAT Spec"](../codeunit/7105.md) (3 calls: `BackfillReimbursementAmounts → HasUpgradeTag`, `SetBackfillReimbursementAmountsUpgradeTag → HasUpgradeTag`, `SetBackfillReimbursementAmountsUpgradeTag → SetUpgradeTag`)
- [Codeunit 9994 "API Data Upgrade"](../codeunit/9994.md) (3 calls: `OnRun → SetSkippedUpgrade`, `UpgradePurchaseCreditMemoBuffer → HasUpgradeTag`, `UpgradePurchaseCreditMemoBuffer → SetUpgradeTag`)
- [Codeunit 104010 "Upg Set Country App Areas"](../codeunit/104010.md) (2 calls: `SetCountryAppAreas → HasUpgradeTag`, `SetCountryAppAreas → SetUpgradeTag`)
- [Codeunit 104042 "Upgrade Permission Sets"](../codeunit/104042.md) (2 calls: `ReplaceObsoletePermissionSetsForEditInExcel → HasUpgradeTag`, `ReplaceObsoletePermissionSetsForEditInExcel → SetUpgradeTag`)
- [Codeunit 104044 "Upgrade Privacy Notices"](../codeunit/104044.md) (2 calls: `OnUpgradePerDatabase → HasUpgradeTag`, `OnUpgradePerDatabase → SetUpgradeTag`)
- [Codeunit 104046 "Upgrade Monitored Field"](../codeunit/104046.md) (2 calls: `UpgradeNotificationCount → HasUpgradeTag`, `UpgradeNotificationCount → SetUpgradeTag`)
- [Codeunit 104047 "Upgrade Profiles"](../codeunit/104047.md) (2 calls: `UpgradeEmployeeProfile → HasUpgradeTag`, `UpgradeEmployeeProfile → SetUpgradeTag`)
- [Codeunit 104050 "Upg Load Named Forward Links"](../codeunit/104050.md) (2 calls: `LoadForwardLinks → HasUpgradeTag`, `LoadForwardLinks → SetUpgradeTag`)
- [Codeunit 104053 "Upgrade Word Report Rendering"](../codeunit/104053.md) (2 calls: `OnUpgradePerDatabase → HasUpgradeTag`, `OnUpgradePerDatabase → SetUpgradeTag`)
- [Codeunit 104056 "Upgrade Workflow"](../codeunit/104056.md) (2 calls: `UpdateWorkflowWithDelegatedAdminTemplate → HasUpgradeTag`, `UpdateWorkflowWithDelegatedAdminTemplate → SetUpgradeTag`)
- [Codeunit 104057 "Upgrade Custom Report Impl."](../codeunit/104057.md) (2 calls: `UpgradeCompany → HasUpgradeTag`, `UpgradeCompany → SetUpgradeTag`)
- [Codeunit 104058 "Upgrade User Setup"](../codeunit/104058.md) (2 calls: `UpgradeUserSetup → HasUpgradeTag`, `UpgradeUserSetup → SetUpgradeTag`)
- [Codeunit 104060 "Upgrade App ID Permissions"](../codeunit/104060.md) (2 calls: `RunUpgrade → HasUpgradeTag`, `RunUpgrade → SetUpgradeTag`)
- [Codeunit 104061 "Upgrade User Groups"](../codeunit/104061.md) (2 calls: `OnUpgradePerDatabase → HasUpgradeTag`, `OnUpgradePerDatabase → SetUpgradeTag`)
- [Codeunit 104063 "Upg. - Default. Calc. Based On"](../codeunit/104063.md) (2 calls: `UpdateDefaultCalcBasedOn → HasUpgradeTag`, `UpdateDefaultCalcBasedOn → SetUpgradeTag`)
- [Codeunit 1541 "Workflow Webhook Events"](../codeunit/1541.md) (2 calls: `CleanupOldIntegrationIdsTableRelation → HasUpgradeTag`, `CleanupOldIntegrationIdsTableRelation → SetUpgradeTag`)
- [Codeunit 1689 "Email Logging Install"](../codeunit/1689.md) (2 calls: `OnInstallAppPerCompany → HasUpgradeTag`, `OnInstallAppPerCompany → SetUpgradeTag`)
- [Codeunit 1714 "Upgrade Bank Deposits"](../codeunit/1714.md) (2 calls: `OnUpgradePerCompany → HasUpgradeTag`, `OnUpgradePerCompany → SetUpgradeTag`)
- [Codeunit 1809 "Assisted Setup Installation"](../codeunit/1809.md) (2 calls: `SetAllUpgradeTags → HasUpgradeTag`, `SetAllUpgradeTags → SetUpgradeTag`)
- [Codeunit 1851 "Sales Forecast Upgrade"](../codeunit/1851.md) (2 calls: `SetConsentIfForecastAlreadyScheduled → HasUpgradeTag`, `SetConsentIfForecastAlreadyScheduled → SetUpgradeTag`)
- [Codeunit 20119 "AMC Bank Upgrade"](../codeunit/20119.md) (2 calls: `UpgradeAMCConsent → HasUpgradeTag`, `UpgradeAMCConsent → SetUpgradeTag`)
- [Codeunit 2015 "Entity Text AI Upgrade"](../codeunit/2015.md) (2 calls: `RegisterCapability → HasUpgradeTag`, `RegisterCapability → SetUpgradeTag`)
- [Codeunit 327 "No. Series Copilot Register"](../codeunit/327.md) (2 calls: `RegisterCapability → HasUpgradeTag`, `RegisterCapability → SetUpgradeTag`)
- [Codeunit 328 "No. Series Upgrade"](../codeunit/328.md) (2 calls: `SetupNoSeriesImplementation → HasUpgradeTag`, `SetupNoSeriesImplementation → SetUpgradeTag`)
- [Codeunit 4001 "Hybrid Cloud Management"](../codeunit/4001.md) (2 calls: `BackupUpgradeTags → BackupUpgradeTags`, `RestoreDataPerDatabaseTables → RestoreUpgradeTagsFromBackup`)
- [Codeunit 40010 "Cloud Mig. Upgrade"](../codeunit/40010.md) (2 calls: `OnUpgradePerCompany → HasUpgradeTag`, `OnUpgradePerCompany → SetUpgradeTag`)
- [Codeunit 4326 "Agent Upgrade"](../codeunit/4326.md) (2 calls: `InsertDefaultPermissionIfEmpty → HasDatabaseUpgradeTag`, `InsertDefaultPermissionIfEmpty → SetDatabaseUpgradeTag`)
- [Codeunit 4709 "VAT Group Upgrade"](../codeunit/4709.md) (2 calls: `UpgradeVATGroupAuthEnum → HasUpgradeTag`, `UpgradeVATGroupAuthEnum → SetUpgradeTag`)
- [Codeunit 4711 "Install VAT Group"](../codeunit/4711.md) (2 calls: `OnInstallAppPerCompany → HasUpgradeTag`, `OnInstallAppPerCompany → SetUpgradeTag`)
- and 37 more: data/code/graph/29/calls.json

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC26

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