Skip to content

[Enforced Digital Vouchers] - Attaching E-Documents when using Digital Vouchers#29793

Open
GMatuleviciute wants to merge 13 commits intomicrosoft:mainfrom
GMatuleviciute:dev/aan/digitalvoucher
Open

[Enforced Digital Vouchers] - Attaching E-Documents when using Digital Vouchers#29793
GMatuleviciute wants to merge 13 commits intomicrosoft:mainfrom
GMatuleviciute:dev/aan/digitalvoucher

Conversation

@GMatuleviciute
Copy link

@GMatuleviciute GMatuleviciute commented Mar 5, 2026

This pull request does not have a related issue as it's part of the delivery for development agreed directly with @altotovi @Groenbech96

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.
  1. 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/BCApps#7006

Fixes #

AndriusAndrulevicius and others added 13 commits February 23, 2026 12:54
Introduces E-Document as a new check type for digital vouchers, enforcing automatic generation and linking for purchase documents. Updates UI logic to ensure consistent behavior and validation. Extends data structures and event handling to support E-Document attachment and integration with related processes.

Enables more robust compliance with regulatory requirements for electronic document management.
Adds feature flag and setup validations before attaching digital vouchers to documents, ensuring attachments only occur when the functionality is enabled and properly configured. Expands handling for purchase credit memos and improves type checks for both sales and purchase documents.
Streamlines digital voucher validation by generalizing E-Document attachment to support more document types and rely on record references rather than hardcoded field access or document types. Improves maintainability and feature extensibility by extracting document details via a dedicated method and refining permission set object ordering. Enhances code clarity and robustness in preparation for feature expansion.
Introduces comprehensive automated tests covering E-Document attachment behavior for sales and purchase documents, ensuring correct enforcement and attachment logic. Updates dependency declarations for better test isolation, removes unused variables, and improves error checking and file name handling for E-Document processing. Enhances reliability and maintainability of digital voucher and E-Document integration.
…herEntrySetup.Table.al

Co-authored-by: Grasiele Matuleviciute <131970463+GMatuleviciute@users.noreply.github.com>
…herEntrySetup.Table.al

Co-authored-by: Grasiele Matuleviciute <131970463+GMatuleviciute@users.noreply.github.com>
Refactors E-Document file attachment for purchase documents by relocating the logic from the check codeunit to the main implementation codeunit, improving code structure and responsibility separation. Updates test object ranges, enhances test reliability, and adjusts error handling to use labels for better localization. Clarifies and simplifies validation around E-Document requirements and streamlines page variable initialization. Improves maintainability and prepares for future extensibility.
@GMatuleviciute GMatuleviciute requested a review from a team as a code owner March 5, 2026 08:06
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Integration GitHub request for Integration area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants