From e33767471391a2a456277529122f47fcb76a8a88 Mon Sep 17 00:00:00 2001 From: magnushar Date: Sun, 1 Dec 2024 10:02:16 +0100 Subject: [PATCH] "Uptake latest master of E-Doc Core. Remove dependency on E-Documents Connector with External Endpoints --- .../Tietoevry/app/.resources/SchemeIds.txt | 1 + .../Tietoevry/app/app.json | 13 +++---- .../app/src/ConnectionSetup.Table.al | 4 +- .../app/src/Extensions/EDocument.TableExt.al | 8 +--- .../app/src/Formats/EDocumentImpl.Codeunit.al | 7 +++- .../app/src/Formats/FormatEvents.Codeunit.al | 39 +++++++++++++++++++ .../app/src/IntegrationImpl.Codeunit.al | 11 ++++-- ...oevryEDocConnectorEdit.PermissionSetExt.al | 4 +- ...oevryEDocConnectorRead.PermissionSetExt.al | 5 ++- .../Tietoevry/app/src/Processing.Codeunit.al | 33 +++++++++------- .../Tietoevry/app/src/Requests.Codeunit.al | 21 ++++++---- .../Tietoevry/app/src/SendMode.Enum.al | 19 +++++++++ 12 files changed, 118 insertions(+), 47 deletions(-) create mode 100644 Apps/W1/EDocumentConnectors/Tietoevry/app/.resources/SchemeIds.txt create mode 100644 Apps/W1/EDocumentConnectors/Tietoevry/app/src/SendMode.Enum.al diff --git a/Apps/W1/EDocumentConnectors/Tietoevry/app/.resources/SchemeIds.txt b/Apps/W1/EDocumentConnectors/Tietoevry/app/.resources/SchemeIds.txt new file mode 100644 index 000000000..1510d0197 --- /dev/null +++ b/Apps/W1/EDocumentConnectors/Tietoevry/app/.resources/SchemeIds.txt @@ -0,0 +1 @@ +{"schemeids": "0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0170 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 9901 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM" } \ No newline at end of file diff --git a/Apps/W1/EDocumentConnectors/Tietoevry/app/app.json b/Apps/W1/EDocumentConnectors/Tietoevry/app/app.json index c1f1f7470..cc67dba43 100644 --- a/Apps/W1/EDocumentConnectors/Tietoevry/app/app.json +++ b/Apps/W1/EDocumentConnectors/Tietoevry/app/app.json @@ -16,13 +16,7 @@ "id": "e1d97edc-c239-46b4-8d84-6368bdf67c8b", "name": "E-Document Core", "publisher": "Microsoft", - "version": "26.0.27172.0" - }, - { - "id": "d852a468-263e-49e5-bfda-f09e33342b89", - "name": "E-Documents Connector with External Endpoints", - "publisher": "Microsoft", - "version": "26.0.27172.0" + "version": "26.0.0.0" } ], "internalsVisibleTo": [ @@ -51,5 +45,8 @@ "target": "OnPrem", "features": [ "TranslationFile" - ] + ], + "resourceFolders": [ + ".resources" + ] } \ No newline at end of file diff --git a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/ConnectionSetup.Table.al b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/ConnectionSetup.Table.al index bd3f5eaff..5164bc16b 100644 --- a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/ConnectionSetup.Table.al +++ b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/ConnectionSetup.Table.al @@ -4,8 +4,6 @@ // ------------------------------------------------------------------------------------------------ namespace Microsoft.EServices.EDocumentConnector.Tietoevry; -using Microsoft.EServices.EDocumentConnector; - table 6392 "Connection Setup" { fields @@ -71,7 +69,7 @@ table 6392 "Connection Setup" Rec.FieldError(Rec."Company Id"); end; } - field(13; "Send Mode"; Enum "E-Doc. Ext. Send Mode") + field(13; "Send Mode"; Enum "Send Mode") { Caption = 'Send Mode'; DataClassification = EndUserIdentifiableInformation; diff --git a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Extensions/EDocument.TableExt.al b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Extensions/EDocument.TableExt.al index bd5acc039..d307518c5 100644 --- a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Extensions/EDocument.TableExt.al +++ b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Extensions/EDocument.TableExt.al @@ -10,9 +10,9 @@ tableextension 6390 "E-Document" extends "E-Document" { fields { - field(6390; "Bill-to/Pay-to Id"; Text[100]) + field(6390; "Tietoevry Document Id"; Text[50]) { - DataClassification = CustomerContent; + DataClassification = SystemMetadata; } field(6391; "Message Id"; Text[50]) { @@ -26,9 +26,5 @@ tableextension 6390 "E-Document" extends "E-Document" { DataClassification = CustomerContent; } - field(6394; "Receiving Company Id"; Text[100]) - { - DataClassification = CustomerContent; - } } } \ No newline at end of file diff --git a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Formats/EDocumentImpl.Codeunit.al b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Formats/EDocumentImpl.Codeunit.al index 089b0ebcd..54c9a3279 100644 --- a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Formats/EDocumentImpl.Codeunit.al +++ b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Formats/EDocumentImpl.Codeunit.al @@ -7,14 +7,19 @@ namespace Microsoft.EServices.EDocumentConnector.Tietoevry; using Microsoft.eServices.EDocument; using Microsoft.Sales.Document; using Microsoft.Sales.History; +using Microsoft.eServices.EDocument.IO.Peppol; using Microsoft.Service.History; using Microsoft.Sales.Peppol; using System.IO; using Microsoft.eServices.EDocument.Service.Participant; using Microsoft.Purchases.Document; +using System.Utilities; codeunit 6391 "Tietoevry E-Document" implements "E-Document" { + + + procedure Check(var SourceDocumentHeader: RecordRef; EDocumentService: Record "E-Document Service"; EDocumentProcessingPhase: enum Microsoft.eServices.EDocument."E-Document Processing Phase") var SalesHeader: Record "Sales Header"; @@ -74,8 +79,6 @@ codeunit 6391 "Tietoevry E-Document" implements "E-Document" end; EDocument.Find(); - ServiceParticipant.Get(EDocumentService.Code, ServiceParticipant."Participant Type"::Customer, EDocument."Bill-to/Pay-to No."); - EDocument."Bill-to/Pay-to Id" := ServiceParticipant."Participant Identifier"; TempBlob.CreateInStream(DocInStream); TempXMLBuffer.LoadFromStream(DocInStream); diff --git a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Formats/FormatEvents.Codeunit.al b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Formats/FormatEvents.Codeunit.al index 2aa1e8f37..163387b2f 100644 --- a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Formats/FormatEvents.Codeunit.al +++ b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Formats/FormatEvents.Codeunit.al @@ -8,6 +8,9 @@ using Microsoft.Sales.Peppol; using Microsoft.Sales.Document; using Microsoft.eServices.EDocument; using Microsoft.eServices.EDocument.Service.Participant; +using System.IO; +using Microsoft.eServices.EDocument.IO.Peppol; +using System.Utilities; codeunit 6398 "Format Events" { @@ -15,6 +18,42 @@ codeunit 6398 "Format Events" SingleInstance = true; EventSubscriberInstance = StaticAutomatic; + [EventSubscriber(ObjectType::Codeunit, Codeunit::"EDoc PEPPOL BIS 3.0", OnAfterCreatePEPPOLXMLDocument, '', false, false)] + local procedure OnAfterCreatePEPPOLXMLDocument(EDocumentService: Record "E-Document Service"; var EDocument: Record "E-Document"; var SourceDocumentHeader: RecordRef; var SourceDocumentLines: RecordRef; var TempBlob: Codeunit "Temp Blob"); + var + TempXMLBuffer: Record "XML Buffer" temporary; + DocInStream: InStream; + MessageDocumentId: Text; + begin + if EDocumentService."Service Integration V2" <> EDocumentService."Service Integration V2"::Tietoevry then + exit; + + TempBlob.CreateInStream(DocInStream); + TempXMLBuffer.LoadFromStream(DocInStream); + TempXMLBuffer.SetRange(Type, TempXMLBuffer.Type::Element); + TempXMLBuffer.SetRange(Name, 'ProfileID'); + if TempXMLBuffer.FindFirst() then + EDocument."Message Profile Id" := TempXMLBuffer.Value; + + TempXMLBuffer.SetRange(Type, TempXMLBuffer.Type::Attribute); + TempXMLBuffer.SetRange(Name, 'xmlns'); + if TempXMLBuffer.FindFirst() then + MessageDocumentId := TempXMLBuffer.Value; + + TempXMLBuffer.SetRange(Type, TempXMLBuffer.Type::Element); + TempXMLBuffer.SetRange(Name); + if TempXMLBuffer.FindFirst() then + MessageDocumentId += '::' + TempXMLBuffer.Name; + + TempXMLBuffer.SetRange(Type, TempXMLBuffer.Type::Element); + TempXMLBuffer.SetRange(Name, 'CustomizationID'); + if TempXMLBuffer.FindFirst() then + MessageDocumentId += '##' + TempXMLBuffer.Value + '::2.1'; + + EDocument."Message Document Id" := MessageDocumentId; + EDocument.Modify(); + end; + [EventSubscriber(ObjectType::Codeunit, Codeunit::"PEPPOL Management", OnAfterGetAccountingSupplierPartyInfoByFormat, '', false, false)] local procedure "PEPPOL Management_OnAfterGetAccountingSupplierPartyInfoByFormat"(var SupplierEndpointID: Text; var SupplierSchemeID: Text; var SupplierName: Text; IsBISBilling: Boolean) var diff --git a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/IntegrationImpl.Codeunit.al b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/IntegrationImpl.Codeunit.al index 66c2bd55e..a4b93b077 100644 --- a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/IntegrationImpl.Codeunit.al +++ b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/IntegrationImpl.Codeunit.al @@ -40,10 +40,15 @@ codeunit 6392 "Integration Impl." implements IDocumentSender, IDocumentResponseH end; [EventSubscriber(ObjectType::Page, Page::"E-Document Service", OnBeforeOpenServiceIntegrationSetupPage, '', false, false)] - local procedure OnBeforeOpenServiceIntegrationSetupPage(EDocumentService: Record "E-Document Service"; var SetupPage: Integer) + local procedure OnBeforeOpenServiceIntegrationSetupPage(EDocumentService: Record "E-Document Service"; var IsServiceIntegrationSetupRun: Boolean) + var + ConnectionSetupCard: Page "Connection Setup Card"; begin - if EDocumentService."Service Integration V2" = EDocumentService."Service Integration V2"::Tietoevry then - SetupPage := Page::"Connection Setup Card"; + if EDocumentService."Service Integration V2" <> EDocumentService."Service Integration V2"::Tietoevry then + exit; + + ConnectionSetupCard.RunModal(); + IsServiceIntegrationSetupRun := true; end; var diff --git a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Permissions/TietoevryEDocConnectorEdit.PermissionSetExt.al b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Permissions/TietoevryEDocConnectorEdit.PermissionSetExt.al index 39e1ff0e2..f0484c9d1 100644 --- a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Permissions/TietoevryEDocConnectorEdit.PermissionSetExt.al +++ b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Permissions/TietoevryEDocConnectorEdit.PermissionSetExt.al @@ -4,9 +4,9 @@ // ------------------------------------------------------------------------------------------------ namespace Microsoft.EServices.EDocumentConnector.Tietoevry; -using Microsoft.EServices.EDocumentConnector; +using System.Security.AccessControl; -permissionsetextension 6394 "Tietoevry EDoc. Connector - Edit" extends "EDocConnector - Edit" +permissionsetextension 6394 "Tietoevry EDoc. Connector - Edit" extends "D365 BASIC" { IncludedPermissionSets = "Tietoevry Edit"; } \ No newline at end of file diff --git a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Permissions/TietoevryEDocConnectorRead.PermissionSetExt.al b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Permissions/TietoevryEDocConnectorRead.PermissionSetExt.al index fa29a1114..d121e222a 100644 --- a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Permissions/TietoevryEDocConnectorRead.PermissionSetExt.al +++ b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Permissions/TietoevryEDocConnectorRead.PermissionSetExt.al @@ -3,9 +3,10 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // ------------------------------------------------------------------------------------------------ namespace Microsoft.EServices.EDocumentConnector.Tietoevry; -using Microsoft.EServices.EDocumentConnector; -permissionsetextension 6392 "Tietoevry EDoc. Connector - Read" extends "EDocConnector - Read" +using System.Security.AccessControl; + +permissionsetextension 6392 "Tietoevry EDoc. Connector - Read" extends "D365 READ" { IncludedPermissionSets = "Tietoevry Read"; } \ No newline at end of file diff --git a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Processing.Codeunit.al b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Processing.Codeunit.al index c3d25f9e8..f5c4fd4c9 100644 --- a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Processing.Codeunit.al +++ b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Processing.Codeunit.al @@ -35,13 +35,13 @@ codeunit 6399 Processing InStream.Read(RequestContent); Request.Init(); - Request.Authenticate().CreateSubmitDocumentRequest(EDocument, RequestContent); + Request.Authenticate().CreateSubmitDocumentRequest(EDocument, EDocumentService, RequestContent); ResponseContent := HttpExecutor.ExecuteHttpRequest(Request); SendContext.Http().SetHttpRequestMessage(Request.GetRequest()); SendContext.Http().SetHttpResponseMessage(HttpExecutor.GetResponse()); EDocument.Get(EDocument."Entry No"); - EDocument."Document Id" := this.ParseDocumentId(ResponseContent); + EDocument."Tietoevry Document Id" := this.ParseDocumentId(ResponseContent); EDocument.Modify(true); end; @@ -56,10 +56,10 @@ codeunit 6399 Processing HttpExecutor: Codeunit "Http Executor"; ResponseContent: Text; begin - EDocument.TestField("Document Id"); + EDocument.TestField("Tietoevry Document Id"); Request.Init(); - Request.Authenticate().CreateGetDocumentStatusRequest(EDocument."Document Id"); + Request.Authenticate().CreateGetDocumentStatusRequest(EDocument."Tietoevry Document Id"); ResponseContent := HttpExecutor.ExecuteHttpRequest(Request); SendContext.Http().SetHttpRequestMessage(Request.GetRequest()); SendContext.Http().SetHttpResponseMessage(HttpExecutor.GetResponse()); @@ -119,7 +119,7 @@ codeunit 6399 Processing exit; end; - EDocument."Document Id" := CopyStr(DocumentId, 1, MaxStrLen(EDocument."Document Id")); + EDocument."Tietoevry Document Id" := CopyStr(DocumentId, 1, MaxStrLen(EDocument."Tietoevry Document Id")); EDocument.Modify(); Request.Init(); @@ -142,7 +142,7 @@ codeunit 6399 Processing ResponseContent: Text; begin Request.Init(); - Request.Authenticate().CreateAcknowledgeRequest(EDocument."Document Id"); + Request.Authenticate().CreateAcknowledgeRequest(EDocument."Tietoevry Document Id"); ResponseContent := HttpExecutor.ExecuteHttpRequest(Request); ReceiveContext.Http().SetHttpRequestMessage(Request.GetRequest()); ReceiveContext.Http().SetHttpResponseMessage(HttpExecutor.GetResponse()); @@ -173,7 +173,7 @@ codeunit 6399 Processing var EDocument: Record "E-Document"; begin - EDocument.SetRange("Document Id", DocumentId); + EDocument.SetRange("Tietoevry Document Id", DocumentId); exit(not EDocument.IsEmpty()); end; @@ -191,10 +191,10 @@ codeunit 6399 Processing ResponseJson.Get('id', ValueJson); DocumentId := ValueJson.AsValue().AsText(); - if StrLen(DocumentId) > MaxStrLen(EDocument."Document Id") then + if StrLen(DocumentId) > MaxStrLen(EDocument."Tietoevry Document Id") then Error(this.TietoevryIdLongerErr); - exit(CopyStr(DocumentId, 1, MaxStrLen(EDocument."Document Id"))); + exit(CopyStr(DocumentId, 1, MaxStrLen(EDocument."Tietoevry Document Id"))); end; /// @@ -207,7 +207,7 @@ codeunit 6399 Processing begin ResponseJson.ReadFrom(ResponseMsg); ResponseJson.Get('id', ValueJson); - if EDocument."Document Id" <> ValueJson.AsValue().AsText() then + if EDocument."Tietoevry Document Id" <> ValueJson.AsValue().AsText() then Error(this.IncorrectDocumentIdInResponseErr); ResponseJson.Get('status', ValueJson); @@ -255,9 +255,16 @@ codeunit 6399 Processing ValidSchemeIdList: List of [Text]; SplitSeparator: Text; SchemeId: Text; + ResInStream: InStream; + JsonObject: JsonObject; + JsonToken: JsonToken; begin SplitSeparator := ' '; - ValidSchemeId := ValidSchemeIdTxt; + NavApp.GetResource(ResourceSchemeIdPath, ResInStream, TextEncoding::UTF8); + ResInStream.ReadText(ValidSchemeId); + JsonObject.ReadFrom(ValidSchemeId); + JsonObject.Get('schemeids', JsonToken); + ValidSchemeId := JsonToken.AsValue().AsText(); ValidSchemeIdList := ValidSchemeId.Split(SplitSeparator); foreach SchemeId in ValidSchemeIdList do @@ -273,8 +280,6 @@ codeunit 6399 Processing TietoevryProcessingDocFailedErr: Label 'An error has been identified in the submitted document.'; TietoevryIdLongerErr: Label 'Tietoevry returned id longer than supported by framework.'; TietoevryTok: Label 'E-Document - Tietoevry', Locked = true; -#pragma warning disable AA0240 - ValidSchemeIdTxt: Label '0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0170 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 9901 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM', Locked = true; -#pragma warning restore AA0240 + ResourceSchemeIdPath: Label 'SchemeIds.txt', Locked = true; } \ No newline at end of file diff --git a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Requests.Codeunit.al b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Requests.Codeunit.al index edd74fadd..263753cd3 100644 --- a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Requests.Codeunit.al +++ b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/Requests.Codeunit.al @@ -8,6 +8,7 @@ using Microsoft.EServices.EDocumentConnector; using Microsoft.eServices.EDocument; using System.Text; using System.Reflection; +using Microsoft.eServices.EDocument.Service.Participant; /// @@ -24,6 +25,7 @@ codeunit 6396 Requests HttpRequestMessage: HttpRequestMessage; BaseUrl, AuthUrl, CompanyId : Text; AccessToken: SecretText; + ServiceParticipantNotFoundErr: Label 'No Service Participant defined for Customer %1 and E-Document Service %2.', Comment = '%1 - The customer no., %2 - The e-document service code'; /// /// Create request for /outbound API @@ -31,8 +33,9 @@ codeunit 6396 Requests /// /// The data object is the details of the invoice. /// A request object that can be used for the endpoint. - procedure CreateSubmitDocumentRequest(EDocument: Record "E-Document"; Data: Text): Codeunit Requests + procedure CreateSubmitDocumentRequest(EDocument: Record "E-Document"; EDocumentService: Record "E-Document Service"; Data: Text): Codeunit Requests var + ServiceParticipant: Record "Service Participant"; Base64Convert: Codeunit "Base64 Convert"; HttpHeaders, HttpContentHeaders : HttpHeaders; Content: Text; @@ -48,14 +51,18 @@ codeunit 6396 Requests EDocument.Get(EDocument."Entry No"); //Refresh ContentJson.Add('payload', Base64Convert.ToBase64(Data)); ContentJson.Add('sender', CompanyId); - ContentJson.Add('receiver', EDocument."Bill-to/Pay-to Id"); + + EDocument.TestField("Bill-to/Pay-to No."); + if not ServiceParticipant.Get(EDocumentService.Code, ServiceParticipant."Participant Type"::Customer, EDocument."Bill-to/Pay-to No.") then + Error(ServiceParticipantNotFoundErr, EDocument."Bill-to/Pay-to No.", EDocumentService.Code); + + ContentJson.Add('receiver', ServiceParticipant."Participant Identifier"); ContentJson.Add('profileId', EDocument."Message Profile Id"); ContentJson.Add('documentId', EDocument."Message Document Id"); ContentJson.Add('channel', 'PEPPOL'); ContentJson.Add('reference', Format(EDocument."Entry No")); ContentJson.WriteTo(Content); - this.HttpRequestMessage.Content.WriteFrom(Content); this.HttpRequestMessage.Content.GetHeaders(HttpContentHeaders); @@ -207,9 +214,9 @@ codeunit 6396 Requests ConnectionSetup.Get(); case ConnectionSetup."Send Mode" of - "E-Doc. Ext. Send Mode"::Production: + "Send Mode"::Production: exit(ConnectionSetup."API URL"); - "E-Doc. Ext. Send Mode"::Test: + "Send Mode"::Test: exit(ConnectionSetup."Sandbox API URL"); else Error('Unsupported %1 in %2', ConnectionSetup.FieldCaption("Send Mode"), ConnectionSetup.TableCaption); @@ -223,9 +230,9 @@ codeunit 6396 Requests ConnectionSetup.Get(); case ConnectionSetup."Send Mode" of - "E-Doc. Ext. Send Mode"::Production: + "Send Mode"::Production: exit(ConnectionSetup."Authentication URL"); - "E-Doc. Ext. Send Mode"::Test: + "Send Mode"::Test: exit(ConnectionSetup."Sandbox Authentication URL"); else Error('Unsupported %1 in %2', ConnectionSetup.FieldCaption("Send Mode"), ConnectionSetup.TableCaption); diff --git a/Apps/W1/EDocumentConnectors/Tietoevry/app/src/SendMode.Enum.al b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/SendMode.Enum.al new file mode 100644 index 000000000..78b99207b --- /dev/null +++ b/Apps/W1/EDocumentConnectors/Tietoevry/app/src/SendMode.Enum.al @@ -0,0 +1,19 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ +namespace Microsoft.EServices.EDocumentConnector.Tietoevry; + +enum 6390 "Send Mode" +{ + Extensible = false; + + value(0; Production) + { + Caption = 'Production'; + } + value(1; Test) + { + Caption = 'Test'; + } +} \ No newline at end of file