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 1 commit
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,14 @@ 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>
procedure GetEnvironmentSetting(SettingName: Text): Text
begin
exit(EnvironmentInformationImpl.GetEnvironmentSetting(SettingName));
end;

}
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ codeunit 3702 "Environment Information Impl."
exit(NavTenantSettingsHelper.GetLinkedPowerPlatformEnvironmentId());
end;

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

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