Skip to content

Commit

Permalink
5th batch fix info
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertverbeek4PS committed Oct 7, 2024
1 parent 7035cab commit 452a962
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 26 deletions.
4 changes: 4 additions & 0 deletions businessCentral/app/src/CurrentSessionAPI.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ page 82571 "ADLSE CurrentSession API"
Editable = false;
}
#pragma warning restore
field(lastModifiedDateTime; Rec.SystemModifiedAt)
{
Editable = false;
}
}
}
}
Expand Down
10 changes: 6 additions & 4 deletions businessCentral/app/src/Execute.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ codeunit 82561 "ADLSE Execute"
FlushedTimeStamp: BigInteger;
FieldId: Integer;
SystemCreatedAt, UtcEpochZero : DateTime;
ErrorMessage: ErrorInfo;
begin
ADLSESetup.GetSingleton();
SetFilterForUpdates(TableID, UpdatedLastTimeStamp, ADLSESetup."Skip Timestamp Sorting On Recs", RecordRef, TimeStampFieldRef);
Expand Down Expand Up @@ -189,14 +190,14 @@ codeunit 82561 "ADLSE Execute"
if UpdatedLastTimeStamp < FlushedTimeStamp then // sample the highest timestamp, to cater to the eventuality that the records do not appear sorted per timestamp
UpdatedLastTimeStamp := FlushedTimeStamp;
end else
Error('%1%2', GetLastErrorText(), GetLastErrorCallStack());
ErrorMessage.Message := StrSubstNo('%1%2', GetLastErrorText(), GetLastErrorCallStack());
until RecordRef.Next() = 0;

if ADLSECommunication.TryFinish(FlushedTimeStamp) then begin
if UpdatedLastTimeStamp < FlushedTimeStamp then // sample the highest timestamp, to cater to the eventuality that the records do not appear sorted per timestamp
UpdatedLastTimeStamp := FlushedTimeStamp
end else
Error('%1%2', GetLastErrorText(), GetLastErrorCallStack());
ErrorMessage.Message := StrSubstNo('%1%2', GetLastErrorText(), GetLastErrorCallStack());
end;
if EmitTelemetry then
ADLSEExecution.Log('ADLSE-009', 'Updated records exported', Verbosity::Normal);
Expand Down Expand Up @@ -230,6 +231,7 @@ codeunit 82561 "ADLSE Execute"
TableCaption: Text;
EntityCount: Text;
FlushedTimeStamp: BigInteger;
ErrorMessage: ErrorInfo;
begin
SetFilterForDeletes(TableID, DeletedLastEntryNo, ADLSEDeletedRecord);

Expand All @@ -253,13 +255,13 @@ codeunit 82561 "ADLSE Execute"
if ADLSECommunication.TryCollectAndSendRecord(RecordRef, ADLSEDeletedRecord."Entry No.", FlushedTimeStamp) then
DeletedLastEntryNo := FlushedTimeStamp
else
Error('%1%2', GetLastErrorText(), GetLastErrorCallStack());
ErrorMessage.Message := StrSubstNo('%1%2', GetLastErrorText(), GetLastErrorCallStack());
until ADLSEDeletedRecord.Next() = 0;

if ADLSECommunication.TryFinish(FlushedTimeStamp) then
DeletedLastEntryNo := FlushedTimeStamp
else
Error('%1%2', GetLastErrorText(), GetLastErrorCallStack());
ErrorMessage.Message := StrSubstNo('%1%2', GetLastErrorText(), GetLastErrorCallStack());
end;
if EmitTelemetry then
ADLSEExecution.Log('ADLSE-011', 'Deleted records exported', Verbosity::Normal, CustomDimensions);
Expand Down
4 changes: 4 additions & 0 deletions businessCentral/app/src/FieldAPI.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ page 82567 "ADLSE Field API"
Editable = false;
}
#pragma warning restore
field(lastModifiedDateTime; Rec.SystemModifiedAt)
{
Editable = false;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion businessCentral/app/src/Gen2Util.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ codeunit 82568 "ADLSE Gen 2 Util"
CouldNotCreateBlobErr: Label 'Could not create blob %1. %2', Comment = '%1: blob path, %2: error text';
CouldNotReadDataInBlobErr: Label 'Could not read data on %1. %2', Comment = '%1: blob path, %2: Http respomse';
CouldNotReadResponseHeaderErr: Label 'Could not read %1 from %2.', Comment = '%1: content header value , %2: blob path';
LatestBlockTagTok: Label '<Latest>%1</Latest>', Comment = '%1: block ID';
LatestBlockTagTok: Label '<Latest>%1</Latest>', Comment = '%1: block ID', Locked = true;

procedure ContainerExists(ContainerPath: Text; ADLSECredentials: Codeunit "ADLSE Credentials"): Boolean
var
Expand Down
6 changes: 3 additions & 3 deletions businessCentral/app/src/Http.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ codeunit 82563 "ADLSE Http"
ContentTypeApplicationJsonTok: Label 'application/json', Locked = true;
ContentTypePlainTextTok: Label 'text/plain; charset=utf-8', Locked = true;
UnsupportedMethodErr: Label 'Unsupported method: %1', Comment = '%1: http method name';
OAuthTok: Label 'https://login.microsoftonline.com/%1/oauth2/token', Comment = '%1: tenant id';
BearerTok: Label 'Bearer %1', Comment = '%1: access token';
AcquireTokenBodyTok: Label 'resource=%1&scope=%2&client_id=%3&client_secret=%4&grant_type=client_credentials', Comment = '%1: encoded resource url, %2: encoded scope url, %3: client ID, %4: client secret';
OAuthTok: Label 'https://login.microsoftonline.com/%1/oauth2/token', Comment = '%1: tenant id', Locked = true;
BearerTok: Label 'Bearer %1', Comment = '%1: access token', Locked = true;
AcquireTokenBodyTok: Label 'resource=%1&scope=%2&client_id=%3&client_secret=%4&grant_type=client_credentials', Comment = '%1: encoded resource url, %2: encoded scope url, %3: client ID, %4: client secret', Locked = true;

procedure SetMethod(HttpMethodValue: Enum "ADLSE Http Method")
begin
Expand Down
2 changes: 1 addition & 1 deletion businessCentral/app/src/HttpMethod.Enum.al
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ enum 82561 "ADLSE Http Method"
Access = Internal;
Extensible = false;

#pragma warning disable LC0016
#pragma warning disable LC0016, LC0045
value(0; Get) { }
value(1; Put) { }
value(2; Delete) { }
Expand Down
20 changes: 4 additions & 16 deletions businessCentral/app/src/Run.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,17 @@ page 82563 "ADLSE Run"
Visible = not DisplayLogsForGivenTable;
}

field(State; Rec.State)
{
ToolTip = 'Specifies the state of the execution of export.';
}
field(State; Rec.State) { }

field(Started; Rec.Started)
{
ToolTip = 'Specifies when the export was started.';
}
field(Started; Rec.Started) { }

field(Ended; Rec.Ended)
{
ToolTip = 'Specifies when the export was started.';
}
field(Ended; Rec.Ended) { }
field("Duration"; Rec.Duration())
{
Caption = 'Duration';
ToolTip = 'Specifies how long export has run.';
}
field("Error"; Rec.Error)
{
ToolTip = 'Specifies the error if the execution had any.';
}
field("Error"; Rec.Error) { }
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions businessCentral/app/src/Run.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,25 @@ table 82566 "ADLSE Run"
{
Editable = false;
Caption = 'State';
ToolTip = 'Specifies the state of the execution of export.';
}
field(5; "Error"; Text[2048])
{
Editable = false;
Caption = 'Error';
ToolTip = 'Specifies the error if the execution had any.';
}
field(6; Started; DateTime)
{
Editable = false;
Caption = 'Started';
ToolTip = 'Specifies when the export was started.';
}
field(7; Ended; DateTime)
{
Editable = false;
Caption = 'Ended';
ToolTip = 'Specifies when the export was started.';
}
}

Expand Down
5 changes: 5 additions & 0 deletions businessCentral/app/src/RunAPI.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ page 82566 "ADLSE Run API"
Editable = false;
}
#pragma warning restore

field(lastModifiedDateTime; Rec.SystemModifiedAt)
{
Editable = false;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion businessCentral/app/src/Setup.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ page 82560 "ADLSE Setup"
{
ApplicationArea = All;
Caption = 'Clear tracked deleted records';
ToolTip = 'Removes the entries in the deleted record list that have already been exported. This should be done periodically to free up storage space. The codeunit ADLSE Clear Tracked Deletions may be invoked using a job queue entry for the same end.';
ToolTip = 'Removes the entries in the deleted record list that have already been exported. The codeunit ADLSE Clear Tracked Deletions may be invoked using a job queue entry for the same end.';
Image = ClearLog;
Enabled = TrackedDeletedRecordsExist;

Expand Down
4 changes: 4 additions & 0 deletions businessCentral/app/src/SetupAPIv11.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ page 82568 "ADLSE Setup API v11"
Editable = false;
}
#pragma warning restore
field(lastModifiedDateTime; Rec.SystemModifiedAt)
{
Editable = false;
}
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions businessCentral/app/src/TableAPI.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ page 82565 "ADLSE Table API"
Editable = false;
}
#pragma warning restore
field(lastModifiedDateTime; Rec.SystemModifiedAt)
{
Editable = false;
}
}
part(adlseField; "ADLSE Field API")
{
Expand Down

0 comments on commit 452a962

Please sign in to comment.