Skip to content

EDocument: scope PEPPOL BIS 3.0 .xml file extension to correct document format#7913

Open
jeffreybulanadi wants to merge 1 commit into
microsoft:mainfrom
jeffreybulanadi:feature/7200-peppol-edoc-log-file-extension
Open

EDocument: scope PEPPOL BIS 3.0 .xml file extension to correct document format#7913
jeffreybulanadi wants to merge 1 commit into
microsoft:mainfrom
jeffreybulanadi:feature/7200-peppol-edoc-log-file-extension

Conversation

@jeffreybulanadi
Copy link
Copy Markdown
Contributor

@jeffreybulanadi jeffreybulanadi commented Apr 30, 2026

Summary

Closes #7200

The SetFileExt event subscriber in EDocImportPEPPOLBIS30.Codeunit.al (codeunit 6166) was unconditionally appending '.xml' to every E-Document Log export, regardless of the Document Format on the E-Document Service. This caused third-party integrations using non-PEPPOL formats (e.g., json, csv) to receive exported files with an incorrect .xml extension.

Root cause

The subscriber appended '.xml' for all Document Formats, not only PEPPOL BIS 3.0.

Change

The subscriber now guards with two conditions before appending '.xml':

  1. The E-Document Log entry's Document Format is PEPPOL BIS 3.0 (the only format this codeunit is responsible for)
  2. The FileName does not already have a file extension, allowing other subscribers or implementations to set their own extension first

No breaking changes

  • PEPPOL BIS 3.0 log exports continue to receive '.xml' when no extension is already set
  • Other format log exports (Data Exchange, custom) are no longer overridden with '.xml'
  • The 'using System.IO;' namespace for 'File Management' is already declared in this codeunit

Fixes AB#634372

…rmat

The SetFileExt event subscriber in EDocImportPEPPOLBIS30.Codeunit.al
unconditionally appended '.xml' to every E-Document Log export,
regardless of the Document Format. This caused third-party integrations
using a non-PEPPOL format (e.g., json, csv) to receive their exported
files with an incorrect .xml extension.

The subscriber now:
- Only appends '.xml' when the E-Document Log entry has Document Format
  set to 'PEPPOL BIS 3.0'
- Only appends '.xml' when the FileName has no extension already set,
  so that other subscribers or implementations can override it first

No changes to behavior for PEPPOL BIS 3.0 documents when no extension
has been set by another subscriber.

Closes microsoft#7200
@jeffreybulanadi jeffreybulanadi requested a review from a team as a code owner April 30, 2026 09:08
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork labels Apr 30, 2026
@JesperSchulz JesperSchulz added the Integration GitHub request for Integration area label May 5, 2026
@Groenbech96 Groenbech96 added the Linked Issue is linked to a Azure Boards work item label May 8, 2026
Copy link
Copy Markdown
Contributor

@Groenbech96 Groenbech96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have build errors. My guess is import statements.

@github-actions github-actions Bot added this to the Version 29.0 milestone May 8, 2026
@JesperSchulz
Copy link
Copy Markdown
Contributor

Build fails with:

MCPConfigImplementation.Codeunit.al(526,85): error AL0132: '"Object Type"' does not contain a definition for 'Query'

@JesperSchulz
Copy link
Copy Markdown
Contributor

Re-running build.

@JesperSchulz JesperSchulz reopened this May 18, 2026
@JesperSchulz JesperSchulz requested a review from a team as a code owner May 18, 2026 11:21
@JesperSchulz JesperSchulz enabled auto-merge (squash) May 18, 2026 11:21
@Groenbech96
Copy link
Copy Markdown
Contributor

Pull latest main into branch.

@Groenbech96
Copy link
Copy Markdown
Contributor

@copilot merge main into the branch

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

Labels

AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork Integration GitHub request for Integration area Linked Issue is linked to a Azure Boards work item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: E-Document - E-Document Log Data Storage content is always exported as an .xml file

3 participants