Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing environment settings. #2921

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,18 @@ codeunit 457 "Environment Information"
exit(EnvironmentInformationImpl.GetLinkedPowerPlatformEnvironmentId());
end;

/// <summary>
/// Gets the value of the specified environment setting. This is only callable from Microsoft published apps.
/// </summary>
/// <param name="SettingName">The name of the setting.</param>
/// <returns>The value of the setting.</returns>
[Scope('OnPrem')]
procedure GetEnvironmentSetting(SettingName: Text): Text
var
ModuleInfo: ModuleInfo;
begin
NavApp.GetCallerModuleInfo(ModuleInfo);
exit(EnvironmentInformationImpl.GetEnvironmentSetting(SettingName, ModuleInfo));
end;

}
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@
exit(NavTenantSettingsHelper.GetLinkedPowerPlatformEnvironmentId());
end;

procedure GetEnvironmentSetting(SettingName: Text; ModuleInfo: ModuleInfo): Text
begin
if ModuleInfo.Publisher <> 'Microsoft' then
exit('');
exit(NavTenantSettingsHelper.GetEnvironmentApplicationSetting(SettingName));

Check failure on line 155 in src/System Application/App/Environment Information/src/EnvironmentInformationImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application and Tools (Clean) / System Application and Tools (Clean)

AL0132 'DotNet "Microsoft.Dynamics.Nav.NavUserAccount.NavTenantSettingsHelper"' does not contain a definition for 'GetEnvironmentApplicationSetting'

Check failure on line 155 in src/System Application/App/Environment Information/src/EnvironmentInformationImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application and Tools (Translated) / System Application and Tools (Translated)

AL0132 'DotNet "Microsoft.Dynamics.Nav.NavUserAccount.NavTenantSettingsHelper"' does not contain a definition for 'GetEnvironmentApplicationSetting'

Check failure on line 155 in src/System Application/App/Environment Information/src/EnvironmentInformationImpl.Codeunit.al

View workflow job for this annotation

GitHub Actions / Build System Application and Tools (Default) / System Application and Tools (Default)

AL0132 'DotNet "Microsoft.Dynamics.Nav.NavUserAccount.NavTenantSettingsHelper"' does not contain a definition for 'GetEnvironmentApplicationSetting'
end;

[InternalEvent(false)]
procedure OnBeforeGetApplicationIdentifier(var AppId: Text)
begin
Expand Down
Loading