Skip to content

Commit

Permalink
Improvements on Job Queue functionality and make Export categories wi…
Browse files Browse the repository at this point in the history
…th DataPerCompany False (#225)
  • Loading branch information
Bertverbeek4PS authored Jan 22, 2025
2 parents c66d952 + 8e146ca commit fe8842f
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 4 deletions.
3 changes: 3 additions & 0 deletions businessCentral/app/permissions/Execute.PermissionSet.al
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions businessCentral/app/permissions/Setup.PermissionSet.al
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion businessCentral/app/src/AssignExportCategoryDialog.page.al
Original file line number Diff line number Diff line change
Expand Up @@ -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.';
}
}
Expand Down
4 changes: 2 additions & 2 deletions businessCentral/app/src/ExportCategories.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
3 changes: 3 additions & 0 deletions businessCentral/app/src/ExportCategory.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
31 changes: 31 additions & 0 deletions businessCentral/app/src/ExportCategoryTable.Table.al
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
2 changes: 1 addition & 1 deletion businessCentral/app/src/Table.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -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.';
}
Expand Down
32 changes: 32 additions & 0 deletions businessCentral/app/src/Upgrade.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ codeunit 82572 "ADLSE Upgrade"
RetenPolLogEntryAdded();
ContainerFieldFromIsolatedStorageToSetupField();
SeperateSchemaAndData();
CopyValuesFromExportCategoryToExportcategoryTable();
end;

var
Expand Down Expand Up @@ -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');
Expand All @@ -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;
}

0 comments on commit fe8842f

Please sign in to comment.