Skip to content

Commit 4f72cc9

Browse files
pluethiPatrick Lüthi
and
Patrick Lüthi
authored
[Fix] URL maximum length in E-Document Integration (#26730)
#### Summary <!-- Provide a general summary of your changes --> Added a new field "Request URL" to table 6127 "E-Document Integration Log" with a maximum string length of 2048 to allow for longer URLs when using the "E-Document Integration" interface. The new filed replaces the existing field URL. I marked the existing field as obsolete and updated three (all) references from the old URL field to the new "Request URL" field. #### Work Item(s) <!-- Add the issue number here after the #. The issue needs to be open and approved. Submitting PRs with no linked issues or unapproved issues is highly discouraged. --> Fixes #26672 Fixes [AB#540448](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/540448) --------- Co-authored-by: Patrick Lüthi <[email protected]>
1 parent 785f277 commit 4f72cc9

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

Apps/W1/EDocument/app/src/Log/EDocumentIntegrationLog.Table.al

+12
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,23 @@ table 6127 "E-Document Integration Log"
4141
field(7; URL; Text[250])
4242
{
4343
Caption = 'URL';
44+
ObsoleteReason = 'Replaced with Request URL field';
45+
#if not CLEAN25
46+
ObsoleteState = Pending;
47+
ObsoleteTag = '25.0';
48+
#else
49+
ObsoleteState = Removed;
50+
ObsoleteTag = '28.0';
51+
#endif
4452
}
4553
field(8; Method; Text[10])
4654
{
4755
Caption = 'Method';
4856
}
57+
field(9; "Request URL"; Text[2048])
58+
{
59+
Caption = 'URL';
60+
}
4961
}
5062

5163
keys

Apps/W1/EDocument/app/src/Log/EDocumentIntegrationLogs.Page.al

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ page 6128 "E-Document Integration Logs"
3131
{
3232
ToolTip = 'Specifies the service code for the document.';
3333
}
34-
field(URL; Rec.URL)
34+
field(URL; Rec."Request URL")
3535
{
3636
ToolTip = 'Specifies the integration url used to send the document.';
3737
}

Apps/W1/EDocument/app/src/Log/EDocumentLog.Codeunit.al

+4-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ codeunit 6132 "E-Document Log"
108108
EDocumentIntegrationLog.Validate("E-Doc. Entry No", EDocument."Entry No");
109109
EDocumentIntegrationLog.Validate("Service Code", EDocumentService.Code);
110110
EDocumentIntegrationLog.Validate("Response Status", HttpResponse.HttpStatusCode());
111-
EDocumentIntegrationLog.Validate(URL, HttpRequest.GetRequestUri());
111+
#if not CLEAN25
112+
EDocumentIntegrationLog.Validate("Url", CopyStr(HttpRequest.GetRequestUri(), 1, 250));
113+
#endif
114+
EDocumentIntegrationLog.Validate("Request URL", HttpRequest.GetRequestUri());
112115
EDocumentIntegrationLog.Validate(Method, HttpRequest.Method());
113116
EDocumentIntegrationLog.Insert();
114117

Apps/W1/EDocument/test/src/Log/EDocLogTest.Codeunit.al

+1-1
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ codeunit 139616 "E-Doc Log Test"
734734
Assert.IsTrue(EDocumentIntegrationLog.FindFirst(), 'There should be an edocument integration log entry');
735735
Assert.AreEqual(EDocumentIntegrationLog."E-Doc. Entry No", EDocument."Entry No", 'EDocument integration log should be linked to edocument');
736736
Assert.AreEqual(HttpRequest.Method(), EDocumentIntegrationLog.Method, 'Integration log should contain method type from request message');
737-
Assert.AreEqual(HttpRequest.GetRequestUri(), EDocumentIntegrationLog.URL, 'Integration log should contain url from request message');
737+
Assert.AreEqual(HttpRequest.GetRequestUri(), EDocumentIntegrationLog."Request URL", 'Integration log should contain url from request message');
738738

739739
EDocumentIntegrationLog.CalcFields("Request Blob");
740740
EDocumentIntegrationLog.CalcFields("Response Blob");

0 commit comments

Comments
 (0)