Expose AppService location and EUDB membership on Environment Information#9716
Draft
t-prda wants to merge 1 commit into
Draft
Expose AppService location and EUDB membership on Environment Information#9716t-prda wants to merge 1 commit into
t-prda wants to merge 1 commit into
Conversation
…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
Contributor
There was a problem hiding this comment.
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(): Textto expose the tenant’s Application Service region string (e.g., “Canada Central”). - Added
IsApplicationServiceInEUDB(): Booleanto 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds two procedures to the public
Environment Informationcodeunit (457) and itsEnvironment Information Impl.(3702):GetApplicationServiceLocation(): Text-> wrapsNavTenantSettingsHelper.GetAppServiceLocation()(e.g. "Canada Central")IsApplicationServiceInEUDB(): Boolean-> wrapsNavTenantSettingsHelper.GetAppServiceInEUDB()Why
These two values are currently only reachable via the platform
DotNet NavTenantSettingsHelpertype. Referencing that DotNet type forces an app totarget: OnPrem(DotNet interop is disallowed fortarget: 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()inEAHttpClient(bothIsSaaS()-guarded) to build the ERP-config payload for the Expense Agent service, and istarget: OnPremlargely because of this single DotNet dependency.Background / context
GetAppServiceLocationwas added to the platform helper in Oct 2025 (BC-Platform PR 230834 / Bug 610944, "Expose Application Service properties to be available in AL").GetAppServiceInEUDBwas added Jun 2026 (BC-Platform #44837 / AB#638032) as the platform leg of a 3-PR EUDB stack (Platform + NAV + BC-ExpenseAgent).AppServicePropertiesgetter 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
LocationandEUDBmembership safe/appropriate to expose as permanent public APIs (versioning/support commitment)?GetApplicationServiceLocation/IsApplicationServiceInEUDBvs. mirroring the platform names?Related work item: AB#643989