community postAL Developmentcommunity - not Microsoftreviewed - checked by Opus

Dynamics 365 Business Central: How to bulk import big/large text (length exceeds 250 and 2048) from external files via AL

This post explains how to bulk import text longer than 250 or 2048 characters from external files into Business Central using XMLPort objects instead of Excel Buffer or CSV Buffer, which have length limitations. It demonstrates the solution with a practical example of importing rich text into a customer table.

post Dynamics 365 Lab

Yun Zhu · 2025-06-24 · 920 words · about 4 min

Key points

  • Excel Buffer and CSV Buffer imports cut field values at 250 characters, while Text fields allow 2048 and Blob fields can hold longer text
  • An XMLport with a temporary Integer tableelement and textelements can import long values; the long textelement needs TextType set to BigText to go beyond 2048
  • In OnBeforeInsertRecord the code writes the value into the target Blob via OutStream, then calls currXMLport.Skip since nothing is inserted into Integer
  • From BC24, Configuration Packages can also import Blob fields, but only for tables that are not system tables

AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

Not found in BC28-30: table “Integer”, xmlport “Import Customer Rich Text”.

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

Heads up

  • warning: “If you don’t have it set, you will not be able to import text longer than 2048 characters.”

Context

  • Features: XMLPort import, Blob field handling, BigText TextType property, Rich text editor, large text import, Configuration Packages
  • Versions: Business Central 2023 wave 2, Business Central 2024 wave 1

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.