---
id: change/bcapps/13999
type: change
title: "#13999 Intrastat export XML performance improvement"
summary: Codeunit 1283 now buffers Data Exch. Field rows in memory and reads from the temporary table instead of querying the database for each XML line and column, eliminating tens of thousands of round trips during large Intrastat exports. Progress dialogs were added to show export status.
tier: official
language: en
tags:
  - performance
  - main
  - bc30
  - codeunit export generic xml
system: development
review:
  state: reviewed
  by: opus
  at: "2026-11-19T00:57:41.676Z"
  flags: []
generated:
  at: "2026-12-05T00:13:03.967Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 6d8ae888461a43e340a0e1428b79b613f48ce7f8
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13999
    title: "microsoft/BCApps#13999: Intrastat export XML performance improvement"
    date: "2026-11-18"
    commit: 6d8ae888461a43e340a0e1428b79b613f48ce7f8
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/1283
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/Germany/how-to-export-and-print-intrastat-reports
      title: Export and Print Intrastat Reports (DE)
      label: possibly related
      why: Documents Intrastat XML export functionality for reporting purposes.
      by: model
number: 13999
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13999
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-18T17:18:09Z"
author: VolodySyn
author_type: User
community_contribution: false
labels:
  - "Team: Finance"
change_class: code
change_kind: performance
behavior_change: true
breaking: false
files:
  count: 1
  additions: 77
  deletions: 8
  al: 1
apps:
  - Base Application
objects_touched:
  - key: codeunit/1283
    page: codeunit/1283
    type: codeunit
    id: 1283
    name: Export Generic XML
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 14285
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/14285
fixes_issues: []
work_items:
  - 658967
systems:
  - development
quote: null
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #13999 Intrastat export XML performance improvement

> Codeunit 1283 now buffers Data Exch. Field rows in memory and reads from the temporary table instead of querying the database for each XML line and column, eliminating tens of thousands of round trips during large Intrastat exports. Progress dialogs were added to show export status.

[Pull request](https://github.com/microsoft/BCApps/pull/13999) · merged into `main` (BC30) on 2026-11-18 by VolodySyn · 1 file (+77 -8), 1 AL · performance · tier official · reviewed (checked by Opus)

## What changed

- Data Exch. Field rows are loaded once into a temporary record using FindSet, reducing database round trips from thousands to one
- New GetDataExchFieldValue overload reads from the in-memory buffer instead of the database
- Progress dialogs display during read and write phases, with update frequency scaling (1, 10, or 100 lines) based on total line count
- Dialogs only appear when GuiAllowed() is true, so background sessions see no UI changes
- Generated XML output remains identical; existing events and the original GetDataExchFieldValue overload are preserved
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 1283 "Export Generic XML"](../../objects/codeunit/1283.md), Base Application: modified

## Also merged into

- [#14285](https://github.com/microsoft/BCApps/pull/14285) into `releases/29.x` on 2026-11-19

## Context

- Work items: AB#658967
- Labels: Team: Finance
- Systems: development

## Possibly related

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

- [Export and Print Intrastat Reports (DE)](https://learn.microsoft.com/dynamics365/business-central/LocalFunctionality/Germany/how-to-export-and-print-intrastat-reports) — possibly related: Documents Intrastat XML export functionality for reporting purposes. (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).
