code change · fixAL Developmentofficial - Microsoftreviewed - checked by Opus

#12309 Fix infinite recursion in Config. Package Field XML name generation

Fixed infinite recursion in XML element name generation when configuration package fields produce duplicate XML names by replacing recursion with a bounded loop that appends counters and properly shortens base names.

Pull request · merged into main (BC30) on 2026-10-06 by darjoo · 2 files (+66 -7), 1 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Prevents stack overflow and out-of-memory errors when adding tables to Configuration Packages with field name collisions
  • Replaces unbounded recursion with bounded loop using counter suffix approach
  • Ensures suffix always fits within 30-character field name limit by shortening base name first
  • Maintains backward compatibility for existing packages and correctly resolved names
  • Added tests verifying behavior with maximum-length field names that previously caused hangs
  • Behaviour changes for users or extensions.

AL objects touched

Context

  • Work items: AB#652923
  • Labels: Team: Integrations
  • Systems: development
  • From the description: “Adding a table to a Configuration Package could run out of memory or stack while generating package fields.”

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