Prerequisites
- Dynamics 365 Finance 10.0.29+ with German localization package installed
- Electronic Reporting configurations updated to latest version (check for XRechnung 3.0)
- Legal entity configured with valid German USt-IdNr in Registration IDs
- Customer master extended with custom field for Leitweg-ID (BT-10)
- ZRE or OZG-RE portal credentials for submission (or Peppol Access Point)
Step-by-Step Setup
Import XRechnung ER configuration from Global Repository
Workspaces → Electronic reporting → Reporting configurations → Exchange → Load from Global repository. Search "XRechnung" → select "XRechnung Sales invoice (DE)" version 131 or higher for XRechnung 3.0 compliance. This includes the correct CustomizationID "urn:xoev-de:kosit:xrechnung:3.0". Earlier versions use outdated 2.x CustomizationID and will be rejected.
Add Leitweg-ID custom field to Customer entity
Accounts receivable → Setup → Accounts receivable parameters → expand "Number sequences" → verify Registration types includes "Leitweg-ID". Then: System administration → Setup → Registration types → create "LWI" type for Leitweg-ID. Now add to customers: Accounts receivable → Customers → [customer] → Registration IDs → add Leitweg-ID value (format: 04011000-12345-67).
Map Leitweg-ID to BuyerReference (BT-10) in ER format
Open XRechnung ER format in designer → navigate to Invoice > cbc:BuyerReference. Edit binding: map to "CustTable.RegistrationNumbers" filtered by type = "LWI". Save derived configuration. This ensures the Leitweg-ID flows to the correct XML element. Without this mapping, you get BR-DE-15 rejection.
Configure seller contact info for BR-DE-17 compliance
Organization administration → Legal entities → select company → Contact information section. Add: Contact person name (Ansprechpartner), Email address, Phone number. These are mandatory for XRechnung BG-6 (Seller Contact). Missing any of these = BR-DE-17 error. Also verify USt-IdNr format: DE followed by exactly 9 digits.
Configure submission channel: ZRE portal or Peppol
For ZRE portal: Workspaces → Electronic invoicing → Service environments → configure endpoint URL for zre.bund.de, upload certificate for authentication. For Peppol (Germany uses Peppol for B2G too): configure Access Point as in Peppol guide. For state portals (Länder): each Bundesland has its own OZG-RE portal—configure corresponding endpoint. Test with Validator before live submission.
Common Dynamics 365 Errors
Why this happens in Dynamics 365
The Leitweg-ID field in Dynamics 365 is not prominently displayed in the default customer form. Users creating their first B2G invoice often miss this required field. Also, imported customer data rarely includes it.
How to fix it
Add Leitweg-ID to customer: Accounts receivable > Customers > E-Document section > Buyer Reference field. Format: XX-XXXXXXXX-XX (e.g., 04011000-1234567890-12).
Why this happens in Dynamics 365
XRechnung requires seller contact information (name, email, phone). Dynamics 365 legal entity setup often skips these optional fields, but they are mandatory for German B2G.
How to fix it
Update Organization administration > Legal entities > Contact information. Add primary contact name, email address, and phone number.
Why this happens in Dynamics 365
XRechnung requires delivery date or period. Quick invoice creation in Dynamics may skip this field. Service invoices often lack a clear delivery date.
How to fix it
Always set delivery date on sales order before invoicing. For services, use the service period dates in the invoice lines.
Why this happens in Dynamics 365
Older Dynamics 365 Electronic reporting configurations may generate outdated XRechnung CustomizationID. Germany requires XRechnung 3.0 format since 2024.
How to fix it
Update to latest XRechnung format from Global repository: Electronic reporting > Configurations > check for updates. CustomizationID must reference XRechnung 3.0.
Pre-Export Checklist for Dynamics 365
Before exporting XRechnung from Dynamics 365, verify these items:
- 1Verify Leitweg-ID is entered in customer E-Document settings
- 2Confirm legal entity has complete contact information
- 3Check USt-IdNr format in tax registration: DE + 9 digits
- 4Ensure delivery date or service period is set
- 5Verify XRechnung format version is 3.0 (check CustomizationID)
- 6Test export with a B2G test customer first
Testing Your Setup
Create a test B2G invoice using the XRechnung format. Export XML via Electronic documents and validate before submitting to ZRE or OZG-RE portal.
💡 German federal portal (xrechnung.bund.de) provides official test files and validation tools. Use these to verify your Dynamics output matches expected format.
Validate Your Output
Export XRechnung XML from Dynamics 365 and upload to Invoice Navigator. The XRechnung validator checks all German-specific BR-DE rules.
Validate XRechnungFAQ
Where do I enter the Leitweg-ID in Dynamics 365?
Can I submit XRechnung directly to German portals?
Related Guides
Ready to Test Your Dynamics 365 Export?
Upload your XRechnung invoice and get instant compliance feedback with Dynamics 365-specific recommendations.
Validate XRechnung Invoice