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

Release/24.23 #150

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .AL-Go/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"businessCentral\\test"
],
"bcptTestFolders": [],
"repoVersion": "24.23"
"repoVersion": "24.25"
}
2 changes: 1 addition & 1 deletion businessCentral/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"publisher": "The bc2adls team",
"brief": "Sync data from Business Central to the Azure storage",
"description": "Exports data in chosen tables to the Azure Data Lake and keeps it in sync by incremental updates. Before you use this tool, please read the SUPPORT.md file at https://github.com/microsoft/bc2adls.",
"version": "24.23.0.0",
"version": "24.25.0.0",
"privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009",
"EULA": "https://go.microsoft.com/fwlink/?linkid=2009120",
"help": "https://go.microsoft.com/fwlink/?LinkId=724011",
Expand All @@ -27,7 +27,7 @@
],
"internalsVisibleTo": [
{
"publisher": "Microsoft",

Check warning on line 30 in businessCentral/app/app.json

View workflow job for this annotation

GitHub Actions / Build . (Default) / . (Default)

PTE0012 The InternalsVisibleTo setting will expose your internal objects to any extension with the given name, publisher, and ID. Access modifiers are not designed to be used as a security boundary, but for API development.
"name": "Tests-TestLibraries",
"id": "5d86850b-0d76-4eca-bd7b-951ad998e997"
},
Expand Down
8 changes: 6 additions & 2 deletions businessCentral/app/src/Communication.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ codeunit 82562 "ADLSE Communication"
EntitySchemaChangedErr: Label 'The schema of the table %1 has changed. %2', Comment = '%1 = Entity name, %2 = NotAllowedOnSimultaneousExportTxt';
CdmSchemaChangedErr: Label 'There may have been a change in the tables to export. %1', Comment = '%1 = NotAllowedOnSimultaneousExportTxt';
MSFabricUrlTxt: Label 'https://onelake.dfs.fabric.microsoft.com/%1/%2.Lakehouse/Files', Locked = true, Comment = '%1: Workspace name, %2: Lakehouse Name';
MSFabricUrlGuidTxt: Label 'https://onelake.dfs.fabric.microsoft.com/%1/%2/Files', Locked = true, Comment = '%1: Workspace name, %2: Lakehouse Name';
ResetTableExportTxt: Label '/reset/%1.txt', Locked = true, comment = '%1 = Table name';

procedure SetupBlobStorage()
Expand All @@ -47,6 +48,7 @@ codeunit 82562 "ADLSE Communication"
local procedure GetBaseUrl(): Text
var
ADLSESetup: Record "ADLSE Setup";
ValidGuid: Guid;
begin
ADLSESetup.GetSingleton();
case ADLSESetup.GetStorageType() of
Expand All @@ -58,8 +60,10 @@ codeunit 82562 "ADLSE Communication"
exit(StrSubstNo(ContainerUrlTxt, ADLSESetup."Account Name", DefaultContainerName));
end;
ADLSESetup."Storage Type"::"Microsoft Fabric":
exit(StrSubstNo(MSFabricUrlTxt, ADLSESetup.Workspace, ADLSESetup.Lakehouse));

if not Evaluate(ValidGuid, ADLSESetup.Lakehouse) then
exit(StrSubstNo(MSFabricUrlTxt, ADLSESetup.Workspace, ADLSESetup.Lakehouse))
else
exit(StrSubstNo(MSFabricUrlGuidTxt, ADLSESetup.Workspace, ADLSESetup.Lakehouse));
end;
end;

Expand Down
5 changes: 3 additions & 2 deletions businessCentral/app/src/CurrentSession.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ table 82565 "ADLSE Current Session"

procedure AreAnySessionsActive() AnyActive: Boolean
begin
Rec.SetRange("Company Name", CopyStr(CompanyName(), 1, 30));
if Rec.FindSet(false) then
repeat
if IsSessionActive() then begin
Expand All @@ -94,8 +95,8 @@ table 82565 "ADLSE Current Session"

procedure CleanupSessions()
begin
Rec.SetRange("Company Name", CompanyName());
Rec.DeleteAll();
Rec.SetRange("Company Name", CopyStr(CompanyName(), 1, 30));
Rec.DeleteAll(false);
end;

procedure CancelAll()
Expand Down
15 changes: 15 additions & 0 deletions businessCentral/app/src/FieldAPI.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@ page 82567 "ADLSE Field API"
SetActionResponse(ActionContext, Rec.SystemId);
end;

[ServiceEnabled]
procedure Enable(var ActionContext: WebServiceActionContext)
var
SelectedADLSEField: Record "ADLSE Field";
begin
CurrPage.SetSelectionFilter(SelectedADLSEField);
if SelectedADLSEField.FindSet(true) then
repeat
SelectedADLSEField.Validate(Enabled, true);
SelectedADLSEField.Modify(true);
until SelectedADLSEField.Next() = 0;
SetActionResponse(ActionContext, Rec.SystemId);
end;


local procedure SetActionResponse(var ActionContext: WebServiceActionContext; AdlsId: Guid)
var
begin
Expand Down
26 changes: 24 additions & 2 deletions businessCentral/app/src/Setup.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,30 @@ table 82560 "ADLSE Setup"
field(30; Workspace; Text[100])
{
Caption = 'Workspace';
trigger OnValidate()
var
ValidGuid: Guid;
begin
if not Evaluate(ValidGuid, Rec.Workspace) then
if (StrLen(Rec.Workspace) < 3) or (StrLen(Rec.Workspace) > 24)
or TextCharactersOtherThan(Rec.Workspace, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_')
then
Error(WorkspaceIncorrectFormatErr);
end;
}
field(31; Lakehouse; Text[100])
{
Caption = 'Lakehouse';
trigger OnValidate()
var
ValidGuid: Guid;
begin
if not Evaluate(ValidGuid, Rec.Lakehouse) then
if (StrLen(Rec.Lakehouse) < 3) or (StrLen(Rec.Lakehouse) > 24)
or TextCharactersOtherThan(Rec.Lakehouse, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_')
then
Error(LakehouseIncorrectFormatErr);
end;
}
field(35; "Schema Exported On"; DateTime)
{
Expand Down Expand Up @@ -172,8 +192,10 @@ table 82560 "ADLSE Setup"

var
MaxReqErrorInfo: ErrorInfo;
ContainerNameIncorrectFormatErr: Label 'The container name is in an incorrect format.';
AccountNameIncorrectFormatErr: Label 'The account name is in an incorrect format.';
ContainerNameIncorrectFormatErr: Label 'The container name is in an incorrect format. Please only use abcdefghijklmnopqrstuvwxyz1234567890_';
AccountNameIncorrectFormatErr: Label 'The account name is in an incorrect format. Please only use abcdefghijklmnopqrstuvwxyz1234567890';
WorkspaceIncorrectFormatErr: Label 'The workspace is in an incorrect format. Please only use abcdefghijklmnopqrstuvwxyz1234567890_ or a valid GUID';
LakehouseIncorrectFormatErr: Label 'The lakehouse is in an incorrect format. Please only use abcdefghijklmnopqrstuvwxyz1234567890_ or a valid GUID';
RecordDoesNotExistErr: Label 'No record on this table exists.';
PrimaryKeyValueLbl: Label '0', Locked = true;
NoSchemaExportedErr: Label 'Schema already exported. Please perform the action "clear schema export date" before changing the schema.';
Expand Down
2 changes: 1 addition & 1 deletion businessCentral/test/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "03486619-1622-4261-ae0e-b366b3c96e3c",
"name": "Azure Data Lake Storage Export Tests",
"publisher": "The bc2adls team",
"version": "24.23.0.0",
"version": "24.25.0.0",
"brief": "Tests for Azure Data Lake Storage Export",
"description": "Tests for Azure Data Lake Storage Export",
"privacyStatement": "",
Expand Down
2 changes: 1 addition & 1 deletion fabric/CopyBusinessCentral.ipynb

Large diffs are not rendered by default.

Loading