#9642 [Bug]: E-Documents for Germany - FindEDocumentService always selects last matching service, ignoring which service triggered the export
E-Document exports for Germany now use the service that triggered the export instead of always selecting the last matching service, ensuring correct settings like PDF embedding are applied.
- 12files
- 9AL files
- 9objects
Pull request · merged into main (BC30) on 2026-09-29 by miljance (community contribution) · 12 files (+847 -1), 9 AL · fix · tier official · reviewed (checked by Opus)
What changed
- XRechnung format passes the triggering service to Export XRechnung Document through SetEDocumentService
- ZUGFeRD uses a new ZUGFeRD Export Context codeunit to carry the service from format into report extensions
- FindEDocumentService and OnAfterFindEDocumentService are deprecated but kept working until CLEAN29 for backward compatibility
- Tests verify both the new path and legacy fallback work correctly
- Context codeunit is public so partners can use it in customized report extensions
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 13916 “Export XRechnung Document”, EDocumentDE (DE layer): modified
- Codeunit 13914 “XRechnung Format”, EDocumentDE (DE layer): modified
- Codeunit 13917 “Export ZUGFeRD Document”, EDocumentDE (DE layer): modified
- Report extension 13919 “Posted Sales Cr.Memo”, EDocumentDE (DE layer): modified
- Report extension 13918 “Posted Sales Invoice”, EDocumentDE (DE layer): modified
- Report extension 13921 “Posted Service Cr. Memo”, EDocumentDE (DE layer): modified
- Report extension 13920 “Posted Service Invoice”, EDocumentDE (DE layer): modified
- Codeunit 11042 “ZUGFeRD Export Context”, EDocumentDE (DE layer): added
- Codeunit 13920 “ZUGFeRD Format”, EDocumentDE (DE layer): modified
Context
- Fixes: #8414 [Bug]: E-Documents for Germany - FindEDocumentService always selects last matching service, ignoring which service triggered the export (open)
- Work items: AB#651618
- Labels: ADO: Sync, From Fork, Team: Finance
- Systems: integration
- From the description: “The triggering service is now handed to the export instead”
Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).