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

Exclude or Include Tables from Cloud Migration #27773

Merged
merged 2 commits into from
Dec 12, 2024
Merged
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 @@ -71,6 +71,46 @@ codeunit 40021 "Cloud Mig. Replicate Data Mgt."
exit(CanBeIncluded);
end;

procedure CheckAndIncludeExcludeTableListFromCloudMigration(TableIDList: List of [Integer]; NewReplicateData: Boolean)
miljance marked this conversation as resolved.
Show resolved Hide resolved
var
Company: Record Company;
miljance marked this conversation as resolved.
Show resolved Hide resolved
begin
if Company.FindSet() then
repeat
CheckAndIncludeExcludeTableListFromCloudMigration(TableIDList, Company.Name, NewReplicateData);
until Company.Next() = 0;
CheckAndIncludeExcludeTableListFromCloudMigration(TableIDList, '', NewReplicateData);
end;

procedure CheckAndIncludeExcludeTableListFromCloudMigration(TableIDList: List of [Integer]; SelectedCompany: Text[30]; NewReplicateData: Boolean)
var
IntelligentCloudStatus: Record "Intelligent Cloud Status";
TableIDFilter: Text;
TableID: Integer;
i: Integer;
SeparatorChar: Char;
begin
if TableIDList.Count = 0 then
exit;

SeparatorChar := '|';
for i := 1 to TableIDList.Count do begin
TableIDList.Get(i, TableID);
TableIDFilter += Format(TableID) + SeparatorChar;
end;
TableIDFilter := TableIDFilter.TrimEnd(SeparatorChar);
IntelligentCloudStatus.SetRange("Company Name", SelectedCompany);
IntelligentCloudStatus.SetFilter("Table Id", TableIDFilter);
if IntelligentCloudStatus.FindSet() then
repeat
IntelligentCloudStatus.Mark(true);
until IntelligentCloudStatus.Next() = 0;
IntelligentCloudStatus.MarkedOnly();

CheckCanChangeTheTable(IntelligentCloudStatus);
IncludeExcludeTablesFromCloudMigration(IntelligentCloudStatus, NewReplicateData);
end;

internal procedure IncludeExcludeTablesFromCloudMigration(var IntelligentCloudStatus: Record "Intelligent Cloud Status"; NewReplicateData: Boolean)
var
HybridCloudManagement: Codeunit "Hybrid Cloud Management";
Expand Down
Loading