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

[Fix] URL maximum length in E-Document Integration #26730

Merged
merged 2 commits into from
Aug 14, 2024
Merged
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
12 changes: 12 additions & 0 deletions Apps/W1/EDocument/app/src/Log/EDocumentIntegrationLog.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,23 @@ table 6127 "E-Document Integration Log"
field(7; URL; Text[250])
{
Caption = 'URL';
ObsoleteReason = 'Replaced with Request URL field';
#if not CLEAN25
ObsoleteState = Pending;
ObsoleteTag = '25.0';
#else
ObsoleteState = Removed;
ObsoleteTag = '28.0';
#endif
}
field(8; Method; Text[10])
{
Caption = 'Method';
}
field(9; "Request URL"; Text[2048])
{
Caption = 'URL';
}
}

keys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ page 6128 "E-Document Integration Logs"
{
ToolTip = 'Specifies the service code for the document.';
}
field(URL; Rec.URL)
field(URL; Rec."Request URL")
JesperSchulz marked this conversation as resolved.
Show resolved Hide resolved
{
ToolTip = 'Specifies the integration url used to send the document.';
}
Expand Down
5 changes: 4 additions & 1 deletion Apps/W1/EDocument/app/src/Log/EDocumentLog.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ codeunit 6132 "E-Document Log"
EDocumentIntegrationLog.Validate("E-Doc. Entry No", EDocument."Entry No");
EDocumentIntegrationLog.Validate("Service Code", EDocumentService.Code);
EDocumentIntegrationLog.Validate("Response Status", HttpResponse.HttpStatusCode());
EDocumentIntegrationLog.Validate(URL, HttpRequest.GetRequestUri());
#if not CLEAN25
EDocumentIntegrationLog.Validate("Url", CopyStr(HttpRequest.GetRequestUri(), 1, 250));
#endif
EDocumentIntegrationLog.Validate("Request URL", HttpRequest.GetRequestUri());
EDocumentIntegrationLog.Validate(Method, HttpRequest.Method());
EDocumentIntegrationLog.Insert();

Expand Down
2 changes: 1 addition & 1 deletion Apps/W1/EDocument/test/src/Log/EDocLogTest.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ codeunit 139616 "E-Doc Log Test"
Assert.IsTrue(EDocumentIntegrationLog.FindFirst(), 'There should be an edocument integration log entry');
Assert.AreEqual(EDocumentIntegrationLog."E-Doc. Entry No", EDocument."Entry No", 'EDocument integration log should be linked to edocument');
Assert.AreEqual(HttpRequest.Method(), EDocumentIntegrationLog.Method, 'Integration log should contain method type from request message');
Assert.AreEqual(HttpRequest.GetRequestUri(), EDocumentIntegrationLog.URL, 'Integration log should contain url from request message');
Assert.AreEqual(HttpRequest.GetRequestUri(), EDocumentIntegrationLog."Request URL", 'Integration log should contain url from request message');

EDocumentIntegrationLog.CalcFields("Request Blob");
EDocumentIntegrationLog.CalcFields("Response Blob");
Expand Down
Loading