Skip to content

Commit

Permalink
fix issue with opening details for attachments from E-Document level
Browse files Browse the repository at this point in the history
  • Loading branch information
petemchlk committed Jan 8, 2025
1 parent 9db9c15 commit 8a4f232
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,21 @@ codeunit 6169 "E-Doc. Attachment Processor"
end;
end;

[EventSubscriber(ObjectType::Page, Page::"Doc. Attachment List FactBox", OnBeforeDocumentAttachmentDetailsRunModal, '', false, false)]
local procedure FilterEDocumentAttachmentsOnBeforeDocumentAttachmentDetailsRunModal(var DocumentAttachment: Record "Document Attachment"; var DocumentAttachmentDetails: Page "Document Attachment Details")
var
EDocumentEntryNo: Integer;
EDocumentEntryNoText: Text;
begin
DocumentAttachment.FilterGroup(4);
EDocumentEntryNoText := DocumentAttachment.GetFilter("E-Document Entry No.");
if EDocumentEntryNoText <> '' then begin
Evaluate(EDocumentEntryNo, EDocumentEntryNoText);
DocumentAttachmentDetails.FilterForEDocuments(EDocumentEntryNo);
end;
DocumentAttachment.FilterGroup(0);
end;

var
MissingEDocumentTypeErr: Label 'E-Document type %1 is not supported for attachments', Comment = '%1 - E-Document document type';

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace Microsoft.eServices.EDocument;
using Microsoft.Foundation.Attachment;

pageextension 6102 EDocDocumentAttachmentDetails extends "Document Attachment Details"
{
internal procedure FilterForEDocuments(EDocumentEntryNo: Integer)
begin
Rec.SetRange("E-Document Attachment", true);
Rec.SetRange("E-Document Entry No.", EDocumentEntryNo);
end;
}

0 comments on commit 8a4f232

Please sign in to comment.