From d95b790a2d8523a4f95c3d35141c53ce3fe15bf2 Mon Sep 17 00:00:00 2001 From: FrankNeeckx Date: Wed, 13 May 2026 14:56:24 +0200 Subject: [PATCH 1/3] Fixes #30057 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi, If at least one security filter is applied to the “Purchase Header” table, the user will have a problem when push ‘Add file from source document’ action on the “Email Attachments” subpage. Message: "Did not find any attachments related to this email" With this event, we will be able to add the following condition: SourceRecordRef.SecurityFiltering(SecurityFilter::Ignored); before reading permissions. Thx in advance, Frank Neeckx --- .../App/Email/src/Email/EmailImpl.Codeunit.al | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al b/src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al index e275ad0ac1..d1371adcd4 100644 --- a/src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al +++ b/src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al @@ -746,7 +746,11 @@ codeunit 8900 "Email Impl" var AllObj: Record AllObj; SourceRecordRef: RecordRef; + Handled: Boolean; begin + OnBeforeFilterRemovedSourceRecords(EmailRelatedRecord,Handled); + if Handled then + exit; repeat if AllObj.Get(AllObj."Object Type"::Table, EmailRelatedRecord."Table Id") then begin SourceRecordRef.Open(EmailRelatedRecord."Table Id"); @@ -1112,5 +1116,10 @@ codeunit 8900 "Email Impl" GlobalLanguage(CurrentLanguage); end; + + [IntegrationEvent(false, false)] + local procedure OnBeforeFilterRemovedSourceRecords(var EmailRelatedRecord: Record "Email Related Record";var Handled:Boolean) + begin + end; #endregion } From 74e1a13f2990fee894537c64e8ebef284702f9c7 Mon Sep 17 00:00:00 2001 From: FrankNeeckx Date: Wed, 13 May 2026 16:47:06 +0200 Subject: [PATCH 2/3] Update src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../App/Email/src/Email/EmailImpl.Codeunit.al | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al b/src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al index d1371adcd4..ed5ffe63b4 100644 --- a/src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al +++ b/src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al @@ -748,7 +748,7 @@ codeunit 8900 "Email Impl" SourceRecordRef: RecordRef; Handled: Boolean; begin - OnBeforeFilterRemovedSourceRecords(EmailRelatedRecord,Handled); +OnBeforeFilterRemovedSourceRecords(EmailRelatedRecord, Handled); if Handled then exit; repeat From ec7b1530d478e91adf76697a7702e750eb69593c Mon Sep 17 00:00:00 2001 From: FrankNeeckx Date: Wed, 13 May 2026 16:47:29 +0200 Subject: [PATCH 3/3] Update src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../App/Email/src/Email/EmailImpl.Codeunit.al | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al b/src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al index ed5ffe63b4..6f29748f7e 100644 --- a/src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al +++ b/src/System Application/App/Email/src/Email/EmailImpl.Codeunit.al @@ -1118,7 +1118,7 @@ OnBeforeFilterRemovedSourceRecords(EmailRelatedRecord, Handled); end; [IntegrationEvent(false, false)] - local procedure OnBeforeFilterRemovedSourceRecords(var EmailRelatedRecord: Record "Email Related Record";var Handled:Boolean) + local procedure OnBeforeFilterRemovedSourceRecords(var EmailRelatedRecord: Record "Email Related Record"; var Handled: Boolean) begin end; #endregion