diff --git a/businessCentral/app/permissions/Api.PermissionSet.al b/businessCentral/app/permissions/Api.PermissionSet.al index bc3e3e0..2c66e80 100644 --- a/businessCentral/app/permissions/Api.PermissionSet.al +++ b/businessCentral/app/permissions/Api.PermissionSet.al @@ -14,15 +14,11 @@ permissionset 82563 "ADLSE - API" tabledata "ADLSE Current Session" = R, tabledata "ADLSE Run" = R, tabledata "ADLSE Field" = RI, - page "ADLSE Table API" = X, page "ADLSE Table API v12" = X, - page "ADLSE Setup API v11" = X, page "ADLSE Setup API v12" = X, page "ADLSE Field API v12" = X, page "ADLSE CurrentSession API" = X, - page "ADLSE Run API" = X, page "ADLSE Run API v12" = X, - page "ADLSE Field API" = X, codeunit "ADLSE External Events Helper" = X, codeunit "ADLSE External Events" = X; } \ No newline at end of file diff --git a/businessCentral/app/src/FieldAPI.Page.al b/businessCentral/app/src/FieldAPI.Page.al deleted file mode 100644 index 5aef56e..0000000 --- a/businessCentral/app/src/FieldAPI.Page.al +++ /dev/null @@ -1,90 +0,0 @@ -// Create an API page for table and field - -page 82567 "ADLSE Field API" -{ - PageType = API; - APIPublisher = 'bc2adlsTeamMicrosoft'; - APIGroup = 'bc2adls'; - APIVersion = 'v1.0', 'v1.1'; - EntityName = 'adlseField'; - EntitySetName = 'adlseFields'; - SourceTable = "ADLSE Field"; - InsertAllowed = true; - ModifyAllowed = false; - DeleteAllowed = false; - DelayedInsert = true; - ODataKeyFields = SystemId; - ObsoleteState = Pending; - ObsoleteReason = 'This API is obsolete. Use the API v1.2 instead.'; - - layout - { - area(Content) - { - repeater(GroupName) - { - field(tableId; Rec."Table ID") { } - field(fieldId; Rec."Field ID") { } - field(enabled; Rec.Enabled) { } - field(systemId; Rec.SystemId) - { - Editable = false; - } -#pragma warning disable LC0016 - field(systemRowVersion; Rec.SystemRowVersion) - { - Editable = false; - } -#pragma warning restore - field(lastModifiedDateTime; Rec.SystemModifiedAt) - { - Editable = false; - } - } - } - } - - [ServiceEnabled] - procedure Disable(var ActionContext: WebServiceActionContext) - var - SelectedADLSEField: Record "ADLSE Field"; - begin - CurrPage.SetSelectionFilter(SelectedADLSEField); - if SelectedADLSEField.FindSet(true) then - repeat - SelectedADLSEField.Validate(Enabled, false); - SelectedADLSEField.Modify(true); - until SelectedADLSEField.Next() = 0; - 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 - SetActionResponse(ActionContext, Page::"ADLSE Field API", AdlsId); - end; - - local procedure SetActionResponse(var ActionContext: WebServiceActionContext; PageId: Integer; DocumentId: Guid) - var - begin - ActionContext.SetObjectType(ObjectType::Page); - ActionContext.SetObjectId(PageId); - ActionContext.AddEntityKey(Rec.FieldNo(SystemId), DocumentId); - ActionContext.SetResultCode(WebServiceActionResultCode::Updated); - end; -} \ No newline at end of file diff --git a/businessCentral/app/src/RunAPI.Page.al b/businessCentral/app/src/RunAPI.Page.al deleted file mode 100644 index 5363edf..0000000 --- a/businessCentral/app/src/RunAPI.Page.al +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. See LICENSE in the project root for license information. -page 82566 "ADLSE Run API" -{ - PageType = API; - APIPublisher = 'bc2adlsTeamMicrosoft'; - APIGroup = 'bc2adls'; - APIVersion = 'v1.0', 'v1.1'; - EntityName = 'adlseRun'; - EntitySetName = 'adlseRun'; - SourceTable = "ADLSE Run"; - InsertAllowed = false; - DeleteAllowed = false; - ModifyAllowed = false; - ODataKeyFields = SystemId; - ObsoleteState = Pending; - ObsoleteReason = 'This API is obsolete. Use the API v1.2 instead.'; - - layout - { - area(Content) - { - repeater(GroupName) - { - field(id; Rec.ID) { } - field(tableId; Rec."Table ID") { } - field(companyName; Rec."Company Name") { } - field(state; Rec.State) { } - field("error"; Rec.Error) { } - field(started; Rec.Started) { } - field(ended; Rec.Ended) { } - field(systemId; Rec.SystemId) - { - Editable = false; - } -#pragma warning disable LC0016 - field(systemRowVersion; Rec.SystemRowVersion) - { - Editable = false; - } -#pragma warning restore - - field(lastModifiedDateTime; Rec.SystemModifiedAt) - { - Editable = false; - } - } - } - } -} \ No newline at end of file diff --git a/businessCentral/app/src/SetupAPIv11.Page.al b/businessCentral/app/src/SetupAPIv11.Page.al deleted file mode 100644 index 061bfd7..0000000 --- a/businessCentral/app/src/SetupAPIv11.Page.al +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. See LICENSE in the project root for license information. -page 82568 "ADLSE Setup API v11" -{ - PageType = API; - APIPublisher = 'bc2adlsTeamMicrosoft'; - APIGroup = 'bc2adls'; - APIVersion = 'v1.1'; - EntityName = 'adlseSetup'; - EntitySetName = 'adlseSetup'; - SourceTable = "ADLSE Setup"; - InsertAllowed = false; - DeleteAllowed = false; - ModifyAllowed = false; - ODataKeyFields = SystemId; - ObsoleteState = Pending; - ObsoleteReason = 'This API is obsolete. Use the API v1.2 instead.'; - - layout - { - area(Content) - { - repeater(GroupName) - { - field(primaryKey; Rec."Primary Key") { } - field(container; Rec.Container) { } - field(emitTelemetry; Rec."Emit telemetry") { } - field(dataFormat; Rec.DataFormat) { } - field(maxPayloadSizeMiB; Rec.MaxPayloadSizeMiB) { } - field(multiCompanyExport; Rec."Schema Exported On") - { - Editable = false; - } - field(exportEnumasInteger; Rec."Export Enum as Integer") { } - field(systemId; Rec.SystemId) - { - Editable = false; - } -#pragma warning disable LC0016 - field(systemRowVersion; Rec.SystemRowVersion) - { - Editable = false; - } -#pragma warning restore - field(lastModifiedDateTime; Rec.SystemModifiedAt) - { - Editable = false; - } - } - } - } - - [ServiceEnabled] - procedure StartExport(var ActionContext: WebServiceActionContext) - var - ADLSEExecution: Codeunit "ADLSE Execution"; - begin - ADLSEExecution.StartExport(); - SetActionResponse(ActionContext, Rec."SystemId"); - end; - - [ServiceEnabled] - procedure StopExport(var ActionContext: WebServiceActionContext) - var - ADLSEExecution: Codeunit "ADLSE Execution"; - begin - ADLSEExecution.StopExport(); - SetActionResponse(ActionContext, Rec."SystemId"); - end; - - [ServiceEnabled] - procedure SchemaExport(var ActionContext: WebServiceActionContext) - var - ADLSEExecution: Codeunit "ADLSE Execution"; - begin - ADLSEExecution.SchemaExport(); - SetActionResponse(ActionContext, Rec."SystemId"); - end; - - [ServiceEnabled] - procedure ClearSchemaExportedOn(var ActionContext: WebServiceActionContext) - var - ADLSEExecution: Codeunit "ADLSE Execution"; - begin - ADLSEExecution.ClearSchemaExportedOn(); - SetActionResponse(ActionContext, Rec."SystemId"); - end; - - [ServiceEnabled] - procedure RefreshOptions(var ActionContext: WebServiceActionContext) - var - ADLSEEnumTranslation: Record "ADLSE Enum Translation"; - begin - ADLSEEnumTranslation.RefreshOptions(); - SetActionResponse(ActionContext, Rec."SystemId"); - end; - - local procedure SetActionResponse(var ActionContext: WebServiceActionContext; AdlsId: Guid) - var - begin - SetActionResponse(ActionContext, Page::"ADLSE Setup API v11", AdlsId); - end; - - local procedure SetActionResponse(var ActionContext: WebServiceActionContext; PageId: Integer; DocumentId: Guid) - var - begin - ActionContext.SetObjectType(ObjectType::Page); - ActionContext.SetObjectId(PageId); - ActionContext.AddEntityKey(Rec.FieldNo(SystemId), DocumentId); - ActionContext.SetResultCode(WebServiceActionResultCode::Updated); - end; -} \ No newline at end of file diff --git a/businessCentral/app/src/TableAPI.Page.al b/businessCentral/app/src/TableAPI.Page.al deleted file mode 100644 index b809675..0000000 --- a/businessCentral/app/src/TableAPI.Page.al +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. See LICENSE in the project root for license information. -page 82565 "ADLSE Table API" -{ - PageType = API; - APIPublisher = 'bc2adlsTeamMicrosoft'; - APIGroup = 'bc2adls'; - APIVersion = 'v1.0', 'v1.1'; - EntityName = 'adlseTable'; - EntitySetName = 'adlseTables'; - SourceTable = "ADLSE Table"; - InsertAllowed = true; - ModifyAllowed = false; - DeleteAllowed = false; - DelayedInsert = true; - ODataKeyFields = SystemId; - ObsoleteState = Pending; - ObsoleteReason = 'This API is obsolete. Use the API v1.2 instead.'; - - layout - { - area(Content) - { - repeater(GroupName) - { - field(tableId; Rec."Table ID") { } - field(enabled; Rec.Enabled) - { - Editable = false; - } - field(systemId; Rec.SystemId) - { - Editable = false; - } -#pragma warning disable LC0016 - field(systemRowVersion; Rec.SystemRowVersion) - { - Editable = false; - } -#pragma warning restore - field(lastModifiedDateTime; Rec.SystemModifiedAt) - { - Editable = false; - } - } - part(adlseField; "ADLSE Field API") - { - EntityName = 'adlseField'; - EntitySetName = 'adlseFields'; - SubPageLink = "Table ID" = field("Table ID"); - } - } - } - - [ServiceEnabled] - procedure Reset(var ActionContext: WebServiceActionContext) - var - SelectedADLSETable: Record "ADLSE Table"; - begin - CurrPage.SetSelectionFilter(SelectedADLSETable); - SelectedADLSETable.ResetSelected(); - SetActionResponse(ActionContext, Rec.SystemId); - end; - - [ServiceEnabled] - procedure Enable(var ActionContext: WebServiceActionContext) - var - SelectedADLSETable: Record "ADLSE Table"; - begin - CurrPage.SetSelectionFilter(SelectedADLSETable); - if SelectedADLSETable.FindSet(true) then - repeat - SelectedADLSETable.Validate(Enabled, true); - SelectedADLSETable.Modify(true); - until SelectedADLSETable.Next() = 0; - SetActionResponse(ActionContext, Rec.SystemId); - end; - - [ServiceEnabled] - procedure Disable(var ActionContext: WebServiceActionContext) - var - SelectedADLSETable: Record "ADLSE Table"; - begin - CurrPage.SetSelectionFilter(SelectedADLSETable); - if SelectedADLSETable.FindSet(true) then - repeat - SelectedADLSETable.Validate(Enabled, false); - SelectedADLSETable.Modify(true); - until SelectedADLSETable.Next() = 0; - SetActionResponse(ActionContext, Rec.SystemId); - end; - - [ServiceEnabled] - procedure AddAllFields(var ActionContext: WebServiceActionContext) - begin - Rec.AddAllFields(); - SetActionResponse(ActionContext, Rec.SystemId); - end; - - [ServiceEnabled] - procedure Delete(var ActionContext: WebServiceActionContext) - begin - Rec.Delete(true); - SetActionResponse(ActionContext, Rec.SystemId); - end; - - local procedure SetActionResponse(var ActionContext: WebServiceActionContext; AdlsId: Guid) - var - begin - SetActionResponse(ActionContext, Page::"ADLSE Table API", AdlsId); - end; - - local procedure SetActionResponse(var ActionContext: WebServiceActionContext; PageId: Integer; DocumentId: Guid) - var - begin - ActionContext.SetObjectType(ObjectType::Page); - ActionContext.SetObjectId(PageId); - ActionContext.AddEntityKey(Rec.FieldNo(SystemId), DocumentId); - ActionContext.SetResultCode(WebServiceActionResultCode::Updated); - end; -} \ No newline at end of file