Equisys technical notes

Technical guidance, explanations and fixes for our products

PRB: When using the SDK the Additional Attachments are not attached to the sent email correctly



This Zetadocs technical note applies to:

  • Zetadocs Delivery and Capture Extension for Business Central - all versions


This problem occurs when using the OnBeforeDevilery SDK events AddOrUpdateAdditionalAttachments() function to add additional attachments to the sent email using, the additional attachments are not always attached.

When performing a batch send with the consolidate emails enabled then multiple copies of each attachment are sent, or when doing a single send the additional attachments are not attached to the sent email.


This problem was caused by a bug after an update for the OnBeforeDelivery SDK event to now require an extra parameter (the DocumentLink) when calling AddOrUpdateAdditionalAttachments() to ensure that only 1 copy of the additional attachments are sent. The problem is if this parameter is missing the attachments don't get added to the email.


As a workaround upgrade your Zetadocs Delivery and Zetadocs Capture extension to the latest version (at least v2.0.21306.3) and also update your per tenant extension to now include a DocumentLink when adding the Additional Attachments, see our SDK example.

Alternatively, turn off the Consolidate Emails and Combine Documents options in the Zetadocs Report Settings and turn off Combine PDF in the Zetadocs System Rules. 


Equisys is aware of this issue and will update this technical note when a solution has been found.

Last updated: 1st Dec 2021 (MP) 

Keywords: Delivery, SDK, OnBeforeDelivery

Equisys Logo, Document Management and Expense Management for Business Central

Replaced by script