---
id: change/bcapps/13208
type: change
title: "#13208 [E-Documents] XRechnung: Events to override buyer, delivery and order reference values"
summary: New integration events allow partners to override buyer, delivery, and order reference values in XRechnung export before XML elements are created, eliminating the need to patch finished XML documents.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - codeunit export xrechnung document
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-12-05T01:02:43.170Z"
  flags: []
generated:
  at: "2026-12-06T00:14:19.053Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: c549aa1bf772f8e48e1ec2a158811a3551fc77d2
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13208
    title: "microsoft/BCApps#13208: [E-Documents] XRechnung: Events to override buyer, delivery and order reference values"
    date: "2026-12-04"
    commit: c549aa1bf772f8e48e1ec2a158811a3551fc77d2
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/13916-de
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/Germany/germany-einvoicing
      title: Electronic invoicing in Germany
      label: possibly related
      why: XRechnung format export events for overriding buyer, delivery, and order reference values
      by: model
number: 13208
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13208
kind: pr
base_branch: main
major: "30"
merged_at: "2026-12-04T13:57:54Z"
author: DanielGoehler
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - From Fork
  - "Team: Integrations"
change_class: code
change_kind: feature
behavior_change: false
breaking: false
files:
  count: 3
  additions: 520
  deletions: 28
  al: 1
apps:
  - EDocumentDE
objects_touched:
  - key: codeunit/13916
    page: codeunit/13916-de
    type: codeunit
    id: 13916
    name: Export XRechnung Document
    app: EDocumentDE
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues:
  - 13175
work_items:
  - 656549
systems:
  - integration
quote: null
joined_against:
  major: "30"
  commit: f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671
---

# #13208 [E-Documents] XRechnung: Events to override buyer, delivery and order reference values

> New integration events allow partners to override buyer, delivery, and order reference values in XRechnung export before XML elements are created, eliminating the need to patch finished XML documents.

[Pull request](https://github.com/microsoft/BCApps/pull/13208) · merged into `main` (BC30) on 2026-12-04 by DanielGoehler (community contribution) · 3 files (+520 -28), 1 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- Adds five kinds of integration event, each for sales invoices and sales credit memos, to codeunit 13916 Export XRechnung Document
- Buyer, delivery and order reference values are passed by var before the elements are created
- Other events pass the delivery element or root element so subscribers can add elements such as DeliveryParty or DespatchDocumentReference
- Service documents reach the events through the converted sales header; without subscribers the exported XML is unchanged
- Four new tests cover overridden values and added elements

## AL objects touched

- [Codeunit 13916 "Export XRechnung Document"](../../objects/codeunit/13916-de.md), EDocumentDE (DE layer): modified

## Context

- Fixes: [#13175 [DE][Codeunit][13916][Export XRechnung Document] Events to override buyer, delivery and order reference values before the XML elements are created](https://github.com/microsoft/BCApps/issues/13175) (closed)
- Work items: AB#656549
- Labels: ADO: Sync, From Fork, Team: Integrations
- Systems: integration

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Electronic invoicing in Germany](https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/Germany/germany-einvoicing) — possibly related: XRechnung format export events for overriding buyer, delivery, and order reference values (model-linked)

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).
