Skip to content

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

Merged
Jesper Schulz-Wedde (JesperSchulz) merged 1 commit into
microsoft:mainfrom
jeffreybulanadi:feature/7200-peppol-edoc-log-file-extension
Jul 2, 2026
Merged

EDocument: scope PEPPOL BIS 3.0 .xml file extension to correct document format#7913
Jesper Schulz-Wedde (JesperSchulz) merged 1 commit into
microsoft:mainfrom
jeffreybulanadi:feature/7200-peppol-edoc-log-file-extension

Conversation

@jeffreybulanadi

@jeffreybulanadi Jeffrey Bulanadi (jeffreybulanadi) commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

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
@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 Jesper Schulz-Wedde (JesperSchulz) added the Team: Integrations GitHub request for Integrations area label May 5, 2026
@Groenbech96 Magnus Hartvig Grønbech (Groenbech96) added the ADO: Sync Creates an Azure DevOps work item if needed and indicates that one is linked label May 8, 2026

Copy link
Copy Markdown
Contributor

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.

@Groenbech96

Copy link
Copy Markdown
Contributor

Pull latest main into branch.

@Groenbech96

Copy link
Copy Markdown
Contributor

Copilot merge main into the branch

@JesperSchulz

Copy link
Copy Markdown
Contributor

Retrying CI.

auto-merge was automatically disabled July 1, 2026 07:43

Pull request was closed

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Copilot PR Review

Iteration 1 · Outcome: completed

Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630

Orchestrator pre-filter (13 file(s) excluded)

  • layer-disabled (knowledge) : 13 file(s)

Findings produced by the Copilot CLI agent against BCQuality at 822cae1b2771ac25f665f73369f69093bd4fd630. Reply 👎 on any inline comment to flag false positives.

Merged via the queue into microsoft:main with commit 2e05aa5 Jul 2, 2026
340 of 421 checks passed
alexei-dobriansky pushed a commit that referenced this pull request Jul 2, 2026
…nt format (#7913)

## 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](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/634372)
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.

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

3 participants