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

GP - Config Oldest G/L Year warning message #27683

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
15 changes: 15 additions & 0 deletions Apps/W1/HybridGP/app/src/pages/GPMigrationConfiguration.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,10 @@ page 4050 "GP Migration Configuration"
if (not Confirm(AllModulesDisabledExitQst)) then
exit(false);

if SettingsHasCompanyGLYearZero() then
if (not Confirm(CompanyGLYearZeroExitQst)) then
exit(false);

if ShowManagementPromptOnClose then
if Confirm(OpenCloudMigrationPageQst) then
Page.Run(page::"Intelligent Cloud Management");
Expand All @@ -889,6 +893,16 @@ page 4050 "GP Migration Configuration"
exit(false);
end;

local procedure SettingsHasCompanyGLYearZero(): Boolean
var
GPCompanyAdditionalSettingsCompanies: Record "GP Company Additional Settings";
begin
GPCompanyAdditionalSettingsCompanies.SetFilter("Name", '<>%1', '');
GPCompanyAdditionalSettingsCompanies.SetRange("Migration Completed", false);
GPCompanyAdditionalSettingsCompanies.SetRange("Oldest GL Year to Migrate", 0);
exit(not GPCompanyAdditionalSettingsCompanies.IsEmpty());
end;

local procedure AssignDimension(DimensionNumber: Integer; DimensionLabel: Text[30])
var
GPCompanyAdditionalSettingsCompanies: Record "GP Company Additional Settings";
Expand Down Expand Up @@ -953,6 +967,7 @@ page 4050 "GP Migration Configuration"
OpenCloudMigrationPageQst: Label 'Would you like to open the Cloud Migration Management page to manage your data migrations?';
ResetAllQst: Label 'Are you sure? This will reset all company migration settings to their default values.';
AllModulesDisabledExitQst: Label 'All modules are disabled and nothing will migrate (with the exception of the Snapshot if configured). Are you sure you want to exit?';
CompanyGLYearZeroExitQst: Label 'One or more companies selected for migration have an Oldest G/L Year value set to zero. This will prevent beginning balances from being migrated. Are you sure you want to exit?';
MasterDataOnlyWarningMsg: Label 'Enabling the master data only settings will make the migration not migrate transactions for the configured areas.';
EnableDisableAllHistTrx: Boolean;
}
Loading