diff --git a/businessCentral/app/permissions/Execute.PermissionSet.al b/businessCentral/app/permissions/Execute.PermissionSet.al index 00ad98e..856ead4 100644 --- a/businessCentral/app/permissions/Execute.PermissionSet.al +++ b/businessCentral/app/permissions/Execute.PermissionSet.al @@ -19,7 +19,10 @@ permissionset 82561 "ADLSE - Execute" tabledata "ADLSE Enum Translation" = RIMD, tabledata "ADLSE Enum Translation Lang" = RIMD, tabledata "Deleted Tables Not to Sync" = R, +#pragma warning disable AL0432 tabledata "ADLSE Export Category" = R, +#pragma warning restore AL0432 + tabledata "ADLSE Export Category Table" = R, codeunit "ADLSE UpgradeTagNewCompanySubs" = X, codeunit "ADLSE Upgrade" = X, codeunit "ADLSE Util" = X, diff --git a/businessCentral/app/permissions/Setup.PermissionSet.al b/businessCentral/app/permissions/Setup.PermissionSet.al index 58a0e27..85945d1 100644 --- a/businessCentral/app/permissions/Setup.PermissionSet.al +++ b/businessCentral/app/permissions/Setup.PermissionSet.al @@ -19,7 +19,10 @@ permissionset 82560 "ADLSE - Setup" tabledata "ADLSE Enum Translation" = RIMD, tabledata "ADLSE Enum Translation Lang" = RIMD, tabledata "Deleted Tables Not to Sync" = RIMD, +#pragma warning disable AL0432 tabledata "ADLSE Export Category" = RIMD, +#pragma warning restore AL0432 + tabledata "ADLSE Export Category Table" = RIMD, codeunit "ADLSE Clear Tracked Deletions" = X, codeunit "ADLSE Credentials" = X, codeunit "ADLSE Setup" = X, diff --git a/businessCentral/app/src/AssignExportCategoryDialog.page.al b/businessCentral/app/src/AssignExportCategoryDialog.page.al index 1906fcf..8a9c50e 100644 --- a/businessCentral/app/src/AssignExportCategoryDialog.page.al +++ b/businessCentral/app/src/AssignExportCategoryDialog.page.al @@ -14,7 +14,7 @@ page 82576 "ADLSE Assign Export Category" { ApplicationArea = Basic, Suite; Caption = 'Export Catgory'; - TableRelation = "ADLSE Export Category".Code; + TableRelation = "ADLSE Export Category Table".Code; ToolTip = 'Specifies Unique Code of an Export Category which can be linked to tables which are part of the export to Azure Datalake.'; } } diff --git a/businessCentral/app/src/ExportCategories.Page.al b/businessCentral/app/src/ExportCategories.Page.al index 548f321..fad3f33 100644 --- a/businessCentral/app/src/ExportCategories.Page.al +++ b/businessCentral/app/src/ExportCategories.Page.al @@ -3,8 +3,8 @@ page 82577 "ADLSE Export Categories" ApplicationArea = Basic, Suite; Caption = 'Export Catgories'; PageType = List; - SourceTable = "ADLSE Export Category"; - + SourceTable = "ADLSE Export Category Table"; + UsageCategory = None; layout { diff --git a/businessCentral/app/src/ExportCategory.Table.al b/businessCentral/app/src/ExportCategory.Table.al index 16d5143..f0079e5 100644 --- a/businessCentral/app/src/ExportCategory.Table.al +++ b/businessCentral/app/src/ExportCategory.Table.al @@ -3,6 +3,9 @@ table 82570 "ADLSE Export Category" Caption = 'Export Category'; DataClassification = ToBeClassified; LookupPageId = "ADLSE Export Categories"; + ObsoleteReason = 'Replaced with ADLSE Export Category Table.'; + ObsoleteTag = '25.0'; + ObsoleteState = Pending; fields { diff --git a/businessCentral/app/src/ExportCategoryTable.Table.al b/businessCentral/app/src/ExportCategoryTable.Table.al new file mode 100644 index 0000000..5d760de --- /dev/null +++ b/businessCentral/app/src/ExportCategoryTable.Table.al @@ -0,0 +1,31 @@ +table 82571 "ADLSE Export Category Table" +{ + Caption = 'Export Category Table'; + DataClassification = ToBeClassified; + LookupPageId = "ADLSE Export Categories"; + DataPerCompany = false; + + fields + { + field(1; "Code"; Code[50]) + { + Caption = 'Code'; + DataClassification = CustomerContent; + ToolTip = 'Specifies the Unique Code of a Export Category which can be linked to tables which are part of the export to Azure Datalake.'; + NotBlank = true; + } + field(10; Description; Text[250]) + { + Caption = 'Description'; + DataClassification = CustomerContent; + ToolTip = 'Specifies the Description of the Export Category.'; + } + } + keys + { + key(PK; "Code") + { + Clustered = true; + } + } +} \ No newline at end of file diff --git a/businessCentral/app/src/Table.Table.al b/businessCentral/app/src/Table.Table.al index a2fef69..6fba2f1 100644 --- a/businessCentral/app/src/Table.Table.al +++ b/businessCentral/app/src/Table.Table.al @@ -58,7 +58,7 @@ table 82561 "ADLSE Table" } field(10; ExportCategory; Code[50]) { - TableRelation = "ADLSE Export Category"; + TableRelation = "ADLSE Export Category Table"; DataClassification = CustomerContent; ToolTip = 'Specifies the Export Category which can be linked to tables which are part of the export to Azure Datalake. The Category can be used to schedule the export.'; } diff --git a/businessCentral/app/src/Upgrade.Codeunit.al b/businessCentral/app/src/Upgrade.Codeunit.al index d9e6deb..fae7475 100644 --- a/businessCentral/app/src/Upgrade.Codeunit.al +++ b/businessCentral/app/src/Upgrade.Codeunit.al @@ -25,6 +25,7 @@ codeunit 82572 "ADLSE Upgrade" RetenPolLogEntryAdded(); ContainerFieldFromIsolatedStorageToSetupField(); SeperateSchemaAndData(); + CopyValuesFromExportCategoryToExportcategoryTable(); end; var @@ -112,6 +113,32 @@ codeunit 82572 "ADLSE Upgrade" end; + local procedure CopyValuesFromExportCategoryToExportcategoryTable() + var + UpgradeTag: Codeunit "Upgrade Tag"; + begin + if UpgradeTag.HasUpgradeTag(GetCopyValuesFromExportCategoryToExportcategoryTableUpgradeTag()) then + exit; + DoCopyValuesFromExportCategoryToExportcategoryTable(); + UpgradeTag.SetUpgradeTag(GetCopyValuesFromExportCategoryToExportcategoryTableUpgradeTag()); + end; + + [InherentPermissions(PermissionObjectType::TableData, Database::"ADLSE Export Category Table", 'm')] + local procedure DoCopyValuesFromExportCategoryToExportcategoryTable() + var + ExportCategory: Record "ADLSE Export Category"; + ExportCategoryTable: Record "ADLSE Export Category Table"; + begin + if ExportCategory.FindSet() then + repeat + if not ExportCategoryTable.Get(ExportCategory.Code) then begin + ExportCategoryTable.Init(); + ExportCategoryTable.TransferFields(ExportCategory); + ExportCategoryTable.Insert(); + end; + until ExportCategory.Next() = 0; + end; + procedure GetRetenPolLogEntryAddedUpgradeTag(): Code[250] begin exit('MS-334067-ADLSERetenPolLogEntryAdded-20221028'); @@ -126,4 +153,9 @@ codeunit 82572 "ADLSE Upgrade" begin exit('GITHUB-35-ADLSESeperateSchemaAndData-20230922'); end; + + procedure GetCopyValuesFromExportCategoryToExportcategoryTableUpgradeTag(): Code[250] + begin + exit('GITHUB-225-CopyValuesFromExportCategoryToExportcategoryTable-20250121'); + end; } \ No newline at end of file