Skip to content

[E-Documents Core] - Events for attaching E-Documents when using Digital Vouchers - #7006

Merged
Jesper Schulz-Wedde (JesperSchulz) merged 4 commits into
microsoft:mainfrom
GMatuleviciute:dev/aan/digitalvoucher
Apr 29, 2026
Merged

Jesper Schulz-Wedde (JesperSchulz) merged 4 commits into
microsoft:mainfrom
GMatuleviciute:dev/aan/digitalvoucher

Conversation

@GMatuleviciute

@GMatuleviciute Grasiele Matuleviciute (GMatuleviciute) commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not have a related issue as it's part of the delivery for development agreed directly with Aleksandar Totovic (@altotovi) Magnus Hartvig Grønbech (@Groenbech96)

Implementation

These integration events are required for the Enforced Digital Vouchers app to subscribe to E-Document processing and attach digital voucher records at the correct points in the document lifecycle.

Events added

OnExportEDocumentAfterCreateEDocument in EDocExport.Codeunit.al — Raised after the e-document content has been generated and the success status determined, but before the service status is logged. This placement allows the Digital Vouchers subscriber to access the finalized document blob (TempBlob) and the mapped source document records, which are needed to create and associate a digital voucher with the exported e-document.

OnAfterUpdateToPostedPurchaseEDocument in EDocumentSubscribers.Codeunit.al — Raised after a received purchase e-document is updated to its posted state (document record ID, document number, type, and status are all set). This placement allows the Digital Vouchers subscriber to link the digital voucher to the final posted purchase document, since the posted document number and record ID are only available at this point.

Important

This Pull request related with microsoft/ALAppExtensions#29793

Fixes AB#580350

Introduces new integration events to enable external handlers after creating an exported e-document and after updating a posted purchase e-document.
Enhances extensibility for partners and custom solutions by allowing additional logic to be executed at these key points.
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork labels Mar 5, 2026
@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Could not find linked issues in the pull request description. Please make sure the pull request description contains a line that contains 'Fixes #' followed by the issue number being fixed. Use that pattern for every issue you want to link.

Comment thread src/Apps/W1/EDocument/App/src/Processing/EDocExport.Codeunit.al Outdated
Adjusts the timing of the post-creation event to ensure it is called after the document and service statuses have been updated.
This change helps external handlers to access the latest status information, improving reliability for event subscribers.
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Stale Status Check Deleted

The Pull Request Build workflow run for this PR was older than 72 hours and has been deleted.

📋 Why was it deleted?

Status checks that are too old may no longer reflect the current state of the target branch. To ensure this PR is validated against the latest code and passes up-to-date checks, a fresh build is required.


🔄 How to trigger a new status check:

  1. 📤 Push a new commit to the PR branch, or
  2. 🔁 Close and reopen the PR

This will automatically trigger a new Pull Request Build workflow run.

@github-actions github-actions Bot added the ADO: Sync Creates an Azure DevOps work item if needed and indicates that one is linked label Apr 13, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Apr 13, 2026
@JesperSchulz

Copy link
Copy Markdown
Contributor

Seems stuck. Let's run CI again.

@JesperSchulz
Jesper Schulz-Wedde (JesperSchulz) merged commit b2cdf84 into microsoft:main Apr 29, 2026
89 of 94 checks passed
pull Bot pushed a commit to Mattlk13/BCApps that referenced this pull request Aug 11, 2026
… Vouchers (microsoft#9208)

Original PR: microsoft/ALAppExtensions#29793
(closed due to migration)
This pull request does not have a related issue as it's part of the
delivery for development agreed directly with @altotovi @Groenbech96
@ventselartur

**Implementation**

With this update enhanced automation for Digital Vouchers in sales and
purchase document posting. When enabled, the system will automatically
generate and attach E-Documents and related files to posted documents,
streamlining document management and compliance.

**Functional Changes**

1. New Check Type Option

- The Check Type field in the Digital Voucher Entry Setup table has been
extended to include a new option: E-Document.
- E-Document option is only valid when the Entry Type is set to Sales
Document or Purchase Document.
- The E-Document check type can only be selected when Generate
Automatically is set to TRUE.

2. Automated Document Attachment on Posting

When posting sales or purchase documents, if setup is set to use
E-Documents the system will attach related E-Document files to the
Incoming Document Files of the posted sales/purchase document.

**Impact**

Reduces manual effort in attaching compliance documents.
Ensures all relevant files are consistently linked to posted documents.

> [!IMPORTANT]
> This Pull request related with
microsoft#7006

Fixes #

Fixes
[AB#639562](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/639562)

---------

Co-authored-by: Andrius Andrulevičius <andrius.andrulevicius@companial.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ADO: Sync Creates an Azure DevOps work item if needed and indicates that one is linked AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork Team: Integrations GitHub request for Integrations area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants