top of page

Boost Efficiency in Business Central: Export & Import Multi-Line Text

  • Writer: akash shukla
    akash shukla
  • Sep 9
  • 2 min read

Updated: Sep 10

Microsoft D365 Business Central’s 2024 Release Wave 1 introduces a powerful enhancement: the ability to export and import multi-line text using configuration packages. This feature is a game-changer for consultants and businesses looking to streamline data migration and configuration processes.

What’s New?

Previously, handling multi-line text fields during data migration was challenging. Consultants often relied on manual workarounds or custom scripts, which increased complexity and risk. Now, multi-line text fields can be seamlessly included in configuration packages, ensuring accuracy and efficiency.

How to do this?

You can now use BLOB-type fields, which usually contain multiline text, to import and export data with Configuration Packages. Follow below steps to achieve this:
  • Select Include Field on the Config. Package Fields page to include fields that contain multiline text, such as the Work Description field, in your package.
Configuration Package Card
  • Export data by selecting the Export to Excel action in the Config. Package Card page to update it in Excel. Update your data in Excel, for example, by adding multiline text in the Work Description column.
Excel sheet exported from Package
  • If you try to import this sheet now, you will encounter an error. The reason for this error is that you cannot import a text field as it is; you need to convert your data in Excel to Base64 encoding.
Error at the time of import as it is file
  • How to convert Text into Base64 encoding? You can easily convert your text into excel by using Macros. See below steps:
    • Open your Excel file → Press Alt + F11 (opens VBA editor).
    • Go to Insert → Module.
    • Copy-paste below code:
Excel VBA editor for paste the code
Public Function ToBase64Utf8(ByVal s As String) As String
    Dim stm As Object, xml As Object, node As Object, bytes() As Byte
    Set stm = CreateObject("ADODB.Stream")
    stm.Type = 2: stm.Charset = "utf-8": stm.Open
    stm.WriteText s: stm.Position = 0: stm.Type = 1
    bytes = stm.Read: stm.Close
    Set xml = CreateObject("MSXML2.DOMDocument")
    Set node = xml.createElement("b64")
    node.DataType = "bin.base64": node.nodeTypedValue = bytes
    ToBase64Utf8 = Replace(Replace(node.Text, vbCr, ""), vbLf, "")
End Function
  • Close the editor → Save your file as .xlsm (macro-enabled).
Macro enabled file
  • Open your excel file again and in any cell write this formula - =ToBase64Utf8(C4)
Fill the formule
  • This will return the Base64 version of the text in C4.
Text converted into Base64
  • Copy this value and replace it in the work description field of the actual file. Then, re-import the file. By doing so, your work description or comment will be imported without any issues. Since this field is BLOB type, there are no character limitations.
Final result after import in BC

Why Consultants Will Love This

  • Simplified Data Migration: No more custom scripts—just use standard tools.
  • Improved Accuracy: Reduce formatting issues and data loss.
  • Time & Cost Efficiency: Faster migrations mean more time for value-added tasks.
  • Standardized Approach: Align with best practices and ensure smooth upgrades.

Why Businesses Benefit

  • Faster Data Import: Data import specially for open documents will be faster.
  • Lower Risk of Errors: Automated handling ensures clean, reliable data.
  • Cost Savings: Less manual work = lower implementation costs.
  • Future-Proofing: Standard features mean easier upgrades and less technical debt.

Final Thoughts

This update is a perfect example of how small enhancements can deliver big value. For consultants, it simplifies projects and improves efficiency. For businesses, it means faster, cleaner, and more cost-effective implementations.


 
 
 

Comments


bottom of page