Skip to content

Expose AppService location and EUDB membership on Environment Information#9716

Draft
t-prda wants to merge 1 commit into
mainfrom
private/prdas/expose-appservice-location-eudb
Draft

Expose AppService location and EUDB membership on Environment Information#9716
t-prda wants to merge 1 commit into
mainfrom
private/prdas/expose-appservice-location-eudb

Conversation

@t-prda

@t-prda t-prda commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Draft for discussion — opening this to get input on whether these platform properties are safe to surface as permanent public System Application APIs. Not intended to merge as-is.

What

Adds two procedures to the public Environment Information codeunit (457) and its Environment Information Impl. (3702):

  • GetApplicationServiceLocation(): Text -> wraps NavTenantSettingsHelper.GetAppServiceLocation() (e.g. "Canada Central")
  • IsApplicationServiceInEUDB(): Boolean -> wraps NavTenantSettingsHelper.GetAppServiceInEUDB()

Why

These two values are currently only reachable via the platform DotNet NavTenantSettingsHelper type. Referencing that DotNet type forces an app to target: OnPrem (DotNet interop is disallowed for target: Cloud). Surfacing them on the managed System Application API lets apps read hosting location + EU Data Boundary membership without any DotNet reference.

Concrete driver: the Expense Agent app uses GetAppServiceLocation() / GetAppServiceInEUDB() in EAHttpClient (both IsSaaS()-guarded) to build the ERP-config payload for the Expense Agent service, and is target: OnPrem largely because of this single DotNet dependency.

Background / context

  • GetAppServiceLocation was added to the platform helper in Oct 2025 (BC-Platform PR 230834 / Bug 610944, "Expose Application Service properties to be available in AL").
  • GetAppServiceInEUDB was added Jun 2026 (BC-Platform #44837 / AB#638032) as the platform leg of a 3-PR EUDB stack (Platform + NAV + BC-ExpenseAgent).
  • The whole AppServiceProperties getter family (Id/Location/Geo/Family/PlatformMajorMinor/CountryCodes, plus InEUDB) is currently un-wrapped on codeunit 457, consumed only via first-party DotNet interop so far.

Open questions for reviewers

  • Are Location and EUDB membership safe/appropriate to expose as permanent public APIs (versioning/support commitment)?
  • Naming: GetApplicationServiceLocation / IsApplicationServiceInEUDB vs. mirroring the platform names?
  • Any behavior expectations OnPrem/Docker (both currently return empty/false off-SaaS)?

Related work item: AB#643989

…tion

Add GetApplicationServiceLocation() and IsApplicationServiceInEUDB() to the
public Environment Information codeunit (and its Impl), wrapping the platform
DotNet NavTenantSettingsHelper methods GetAppServiceLocation() and
GetAppServiceInEUDB().

This lets apps read the hosting location and EU Data Boundary membership
through the managed System Application API instead of referencing the
DotNet type directly, which forces target: OnPrem. Draft for discussion.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d33addc7-7b1b-47bd-b3dc-2a723ed7885d
@github-actions github-actions Bot added AL: System Application Integration GitHub request for Integration area labels Jul 24, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 24, 2026
@t-prda
t-prda requested a review from Copilot July 24, 2026 12:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the System Application’s public Environment Information API (codeunit 457) to expose two platform-backed tenant hosting properties—Application Service location and EU Data Boundary (EUDB) membership—via Environment Information Impl. (codeunit 3702), enabling Cloud-targeted apps to read these values without DotNet interop.

Changes:

  • Added GetApplicationServiceLocation(): Text to expose the tenant’s Application Service region string (e.g., “Canada Central”).
  • Added IsApplicationServiceInEUDB(): Boolean to expose whether the tenant’s Application Service is within the Microsoft EU Data Boundary.
  • Implemented both APIs in the internal implementation codeunit by delegating to NavTenantSettingsHelper.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/System Application/App/Environment Information/src/EnvironmentInformationImpl.Codeunit.al Adds implementation procedures that call NavTenantSettingsHelper for AppService location and EUDB membership.
src/System Application/App/Environment Information/src/EnvironmentInformation.Codeunit.al Adds two new public procedures (with XML docs) on Environment Information that forward to the implementation codeunit.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: System Application Integration GitHub request for Integration area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants