---
id: object/codeunit/2504
type: object
title: Codeunit 2504 "Extension Management"
summary: Codeunit 2504 "Extension Management" in System Application (System.Apps). 24 public procedures. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - system 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: cb8f40e1d2577b487fd5495a3602ffc67d0eadbe12b1c52b1231e1511704b6dc
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Extension%20Management/src/ExtensionManagement.Codeunit.al
    title: src/System Application/App/Extension Management/src/ExtensionManagement.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: 2504
name: Extension Management
namespace: System.Apps
app: System 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: 24
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 3
  called_by: 17
  implements: 0
---

# Codeunit 2504 "Extension Management"

> Codeunit 2504 "Extension Management" in System Application (System.Apps). 24 public procedures. Present since at least BC23, still in BC30.

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

## Properties

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

## Procedures

- `InstallExtension(PackageId: Guid; lcid: Integer; IsUIEnabled: Boolean): Boolean`: Installs an extension, based on its PackageId and Locale Identifier.
- `UninstallExtension(PackageId: Guid; IsUIEnabled: Boolean): Boolean`: Uninstalls an extension, based on its PackageId.
- `UninstallExtensionAndDeleteExtensionData(PackageId: Guid; IsUIEnabled: Boolean): Boolean`: Uninstalls an extension, based on its PackageId and permanently deletes the tables that contain data for the extension.
- `UploadExtension(FileStream: InStream; lcid: Integer)`: Uploads an extension, using a File Stream and based on the Locale Identifier. This method is only applicable in SaaS environment.
- `DeployExtension(AppId: Guid; lcid: Integer; IsUIEnabled: Boolean)`: Deploys an extension, based on its ID and Locale Identifier. This method is only applicable in SaaS environment.
- `UnpublishExtension(PackageId: Guid): Boolean`: Unpublishes an extension, based on its PackageId. An extension can only be unpublished, if it is a per-tenant one and it has been uninstalled first.
- `DownloadExtensionSource(PackageId: Guid): Boolean`: Downloads the source of an extension, based on its PackageId.
- `GetExtensionSource(PackageId: Guid; var ExtensionSourceTempBlob: Codeunit "Temp Blob"): Boolean`: Retrives the source of an extension, based on its PackageId.
- `IsInstalledByPackageId(PackageId: Guid): Boolean`: Checks whether an extension is installed, based on its PackageId.
- `IsInstalledByAppId(AppId: Guid): Boolean`: Checks whether an extension is installed, based on its AppId.
- `GetAllExtensionDeploymentStatusEntries(var TempExtensionDeploymentStatus: Record "Extension Deployment Status" temporary)`: Retrieves a list of all the Deployment Status Entries
- `GetDeployOperationInfo(OperationId: Guid; var Version: Text; var Schedule: Text; var Publisher: Text; var AppName: Text; Description: Text)`: Retrieves the AppName,Version,Schedule,Publisher by the NAVApp Tenant OperationId.
- `RefreshStatus(OperationId: Guid)`: Refreshes the status of the Operation.
- `ConfigureExtensionHttpClientRequestsAllowance(PackageId: Text; AreHttpClientRqstsAllowed: Boolean): Boolean`: Allows or disallows Http Client requests against the specified extension.
- `GetLatestVersionPackageIdByAppId(AppId: Guid): Guid`: Gets the PackageId of the latest Extension Version by the Extension AppId.
- `GetCurrentlyInstalledVersionPackageIdByAppId(AppId: Guid): Guid`: Gets the PackageId of the latest version of the extension by the extension's AppId.
- `GetSpecificVersionPackageIdByAppId(AppId: Guid; Name: Text; VersionMajor: Integer; VersionMinor: Integer; VersionBuild: Integer; VersionRevision: Integer): Guid`: Gets the package ID of the version of the extension by the extension's AppId, Name, Version Major, Version Minor, Version Build, Version Revision.
- `GetExtensionLogo(AppId: Guid; var LogoTempBlob: Codeunit "Temp Blob")`: Gets the logo of an extension.
- `UploadExtensionToVersion(FileInStream: InStream; lcid: Integer; DeployTo: Enum "Extension Deploy To")`: Uploads an extension to current version, next minor or next major, using a File Stream and based on the Locale Identifier. This method is only applicable in SaaS environment.
- `UploadExtensionToVersion(FileInStream: InStream; lcid: Integer; DeployTo: Enum "Extension Deploy To"; SyncMode: Enum "Extension Sync Mode")`: Uploads an extension to current version, next minor or next major, using a File Stream and based on the Locale Identifier. This method is only applicable in SaaS environment.
- `InstallMarketplaceExtension(AppId: Guid)`: Installs an extension, based on its extension id.
- `GetAppName(AppId: Guid): Text`: Returns the Name of the app given the App Id.
- `GetDeploymentDetailedStatusMessage(OperationId: Guid): Text`: Returns the detailed message from a deployment operation.
- `GetDeploymentDetailedStatusMessageAsStream(OperationId: Guid; OutStream: OutStream)`: Writes the detailed message from a deployment operation to a stream.

## 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 2503 "Extension Operation Impl"](../codeunit/2503.md) (16 calls: `ConfigureExtensionHttpClientRequestsAllowance → ConfigureExtensionHttpClientRequestsAllowance`, `DeployExtension → DeployExtension`, `DownloadExtensionSource → DownloadExtensionSource`, …)
- [Codeunit 2500 "Extension Installation Impl"](../codeunit/2500.md) (5 calls: `InstallExtension → InstallExtension`, `IsInstalledByAppId → IsInstalledByAppId`, `IsInstalledByPackageId → IsInstalledByPackageId`, …)
- [Codeunit 2501 "Extension Marketplace"](../codeunit/2501.md) (1 call: `InstallMarketplaceExtension → InstallAppsourceExtensionWithRefreshSession`)

## Called by

- [Page 30002 "APIV2 - Aut. Extensions"](../page/30002.md) (9 calls: `install → InstallExtension`, `install → IsInstalledByPackageId`, `OnAfterGetCurrRecord → IsInstalledByPackageId`, …)
- [Page 20002 "APIV1 - Aut. Extensions"](../page/20002.md) (5 calls: `install → InstallExtension`, `install → IsInstalledByPackageId`, `OnAfterGetCurrRecord → IsInstalledByPackageId`, …)
- [Codeunit 9192 "Company Creation Demo Data"](../codeunit/9192.md) (4 calls: `AreAppsInstalled → IsInstalledByAppId`, `TryInstallApp → GetLatestVersionPackageIdByAppId`, `TryInstallApp → InstallExtension`, …)
- [Codeunit 20422 "Qlty. Demo Data Mgmt."](../codeunit/20422.md) (2 calls: `InstallOrOpenDemoData → InstallMarketplaceExtension`, `IsContosoDemoToolInstalled → IsInstalledByAppId`)
- [Page 20007 "APIV1 - Aut. Extension Depl."](../page/20007.md) (2 calls: `OnAfterGetRecord → GetDeployOperationInfo`, `OnAfterGetRecord → RefreshStatus`)
- [Page 30007 "APIV2 - Aut. Extension Depl."](../page/30007.md) (2 calls: `OnAfterGetRecord → GetDeployOperationInfo`, `OnAfterGetRecord → RefreshStatus`)
- [Page 5448 "Automation Extension Depl."](../page/5448.md) (2 calls: `OnAfterGetRecord → GetDeployOperationInfo`, `OnAfterGetRecord → RefreshStatus`)
- [Codeunit 5330 "CRM Integration Management"](../codeunit/5330.md) (1 call: `IsFieldServiceIntegrationAppInstalled → IsInstalledByAppId`)
- [Page 20006 "APIV1 - Aut. Extension Upload"](../page/20006.md) (1 call: `OnModifyRecord → UploadExtension`)
- [Page 20766 "APIV2 Expanded Permission Sets"](../page/20766.md) (1 call: `OnAfterGetRecord → GetAppName`)
- [Page 2515 "AppSource Product List"](../page/2515.md) (1 call: `OnAfterGetRecord → IsInstalledByAppId`)
- [Page 2516 "AppSource Product Details"](../page/2516.md) (1 call: `SetProduct → IsInstalledByAppId`)
- [Page 30006 "APIV2 - Aut. Extension Upload"](../page/30006.md) (1 call: `Upload → UploadExtensionToVersion`)
- [Page 9197 "Profile Designer Diagnostics"](../page/9197.md) (1 call: `OnAfterGetRecord → GetAppName`)
- [Page 9198 "Profile Import Result List"](../page/9198.md) (1 call: `OnAfterGetRecord → GetAppName`)
- [Page 9199 "Profile Import Wizard"](../page/9199.md) (1 call: `OnAfterGetRecord → GetAppName`)
- [Table 4009 "Migration Table Mapping"](../table/4009.md) (1 call: `UpdateObjectsFilter → IsInstalledByPackageId`)

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