web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

Extending the Document Attachment factbox in the context of Email related attachment functionality

(2) ShareShare
ReportReport
Posted on by 206
Hi All,
 
We followed good advice from zhums and others which gave us the ability to add attachment factbox to records such as Warehouse Shipment and Opportunity.  This included instructions on adding event subscribers to the relavent Document Attachment integration events. This works for users added and accessing attachments from those pages.
 
However, when emailing and trying to use the Add Related Attachments from Source functionality on when previewing/editing a draft email it shows all document attachments related to those tables rather than the specific record in that table.
 
We have found another event subscriber but interestingly when we go back to the original codeunit cannot find anything that gives an example implementation. We suspect this is because the individual app extensions for Office 365 Email, SMTP Email might be implementing this, but their code isn't available in AL Explorer.
 
  [EventSubscriber(ObjectType::Codeunit, Codeunit::Email, OnFindRelatedAttachments, '', false, false)]    local procedure Email_OnFindRelatedAttachments(SourceTableId: Integer; SourceSystemID: Guid; var EmailRelatedAttachments: Record /Email Related Attachment/ temporary)    var
Hoping someone can help us figure out the correct code to ensure that for non-standard tables Document Attachments get filtered to the correct source records. We know something is happening as it shows all related attachments, it just isn't being filtered.
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,050 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,351 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 1,200 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans