D365 Business Central : Send Invoice Email with Attachments

By standard, D365 Business Central can send posted sales invoice email to the customer. What if you want to include other files in the email as well ? I will describe it here on how to customize it to include all the attachments in the sales invoice email.

To achieve this is quite easy, you only need to subscribe to OnBeforeSendEmail on Codeunit Document-Mailing. You can then call the procedure to add the attachments to the Email Item.

Source : That NAV Guy
Read more…