---
id: change/bcapps/9947
type: change
title: "#9947 Allow long localized sales and purchase line type captions"
summary: "Sales and purchase document subforms no longer fail when a localized line type caption is longer than 20 characters, such as the French allocation account caption. A new FormatTypeAsText() returning Text[30] replaces FormatType(): Text[20], which stays as an obsolete wrapper."
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - table purchase line
  - table purch. cr. memo line
  - table purch. inv. line
  - table sales line
  - table sales cr.memo line
  - table sales invoice line
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:09:24.384Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 585e5562d87e48854e019dc3a0d8702d4157f688
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9947
    title: "microsoft/BCApps#9947: Allow long localized sales and purchase line type captions"
    date: "2026-08-13"
    commit: 585e5562d87e48854e019dc3a0d8702d4157f688
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/table/39
    - object/table/125
    - object/table/123
    - object/table/37
    - object/table/115
    - object/table/113
    - object/table/121
    - object/table/111
    - object/page/508
    - object/table/174
    - object/table/171
    - object/table/1670
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9947
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9947
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-13T22:23:33Z"
author: djukicmilica
author_type: User
community_contribution: false
labels:
  - "Ownership: Needs Review"
  - "Team: Other"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 120
  additions: 1944
  deletions: 329
  al: 94
apps:
  - Base Application
objects_touched:
  - key: table/39
    page: table/39
    type: table
    id: 39
    name: Purchase Line
    app: Base Application
    status: modified
  - key: table/125
    page: table/125
    type: table
    id: 125
    name: Purch. Cr. Memo Line
    app: Base Application
    status: modified
  - key: table/123
    page: table/123
    type: table
    id: 123
    name: Purch. Inv. Line
    app: Base Application
    status: modified
  - key: table/37
    page: table/37
    type: table
    id: 37
    name: Sales Line
    app: Base Application
    status: modified
  - key: table/115
    page: table/115
    type: table
    id: 115
    name: Sales Cr.Memo Line
    app: Base Application
    status: modified
  - key: table/113
    page: table/113
    type: table
    id: 113
    name: Sales Invoice Line
    app: Base Application
    status: modified
  - key: table/121
    page: table/121
    type: table
    id: 121
    name: Purch. Rcpt. Line
    app: Base Application
    status: modified
  - key: table/111
    page: table/111
    type: table
    id: 111
    name: Sales Shipment Line
    app: Base Application
    status: modified
  - key: page/508
    page: page/508
    type: page
    id: 508
    name: Blanket Sales Order Subform
    app: Base Application
    status: modified
  - key: table/174
    page: table/174
    type: table
    id: 174
    name: Standard Purchase Line
    app: Base Application
    status: modified
  - key: table/171
    page: table/171
    type: table
    id: 171
    name: Standard Sales Line
    app: Base Application
    status: modified
  - key: table/1670
    page: table/1670
    type: table
    id: 1670
    name: Option Lookup Buffer
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/BE/BaseApp/Sales/Document/SalesLine.Table.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/CH/BaseApp/Utilities/OptionLookupBuffer.Table.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/NA/BaseApp/Sales/Document/BlanketSalesOrderSubform.Page.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/NO/BaseApp/Sales/Document/BlanketSalesOrderSubform.Page.al
    status: modified
    reason: not-in-snapshot
obsoletions:
  - object: Purchase Line
    member: FormatType
    replacement: FormatTypeAsText
  - object: Sales Line
    member: FormatType
    replacement: FormatTypeAsText
backports: []
fixes_issues: []
work_items:
  - 645033
systems:
  - sales
  - purchasing
  - platform
quote: null
joined_against:
  major: "30"
  commit: f18567dc08e2bd162bf192e1da4d714b57eb099f
---

# #9947 Allow long localized sales and purchase line type captions

> Sales and purchase document subforms no longer fail when a localized line type caption is longer than 20 characters, such as the French allocation account caption. A new FormatTypeAsText() returning Text[30] replaces FormatType(): Text[20], which stays as an obsolete wrapper.

[Pull request](https://github.com/microsoft/BCApps/pull/9947) · merged into `main` (BC30) on 2026-08-13 by djukicmilica · 120 files (+1944 -329), 94 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Added FormatTypeAsText() method returning Text[30] to sales, purchase, and standard line tables
- Updated UI and lookup paths to use the new 30-character formatting method
- Preserved existing FormatType(): Text[20] and OnBeforeFormatType() as obsolete compatibility layers
- Introduced new Text[30] events for subscribers needing wider output capacity
- Added regression tests covering long localized captions and legacy event precedence
- Behaviour changes for users or extensions.

## AL objects touched

- [Table 39 "Purchase Line"](../../objects/table/39.md), Base Application: modified
- [Table 125 "Purch. Cr. Memo Line"](../../objects/table/125.md), Base Application: modified
- [Table 123 "Purch. Inv. Line"](../../objects/table/123.md), Base Application: modified
- [Table 37 "Sales Line"](../../objects/table/37.md), Base Application: modified
- [Table 115 "Sales Cr.Memo Line"](../../objects/table/115.md), Base Application: modified
- [Table 113 "Sales Invoice Line"](../../objects/table/113.md), Base Application: modified
- [Table 121 "Purch. Rcpt. Line"](../../objects/table/121.md), Base Application: modified
- [Table 111 "Sales Shipment Line"](../../objects/table/111.md), Base Application: modified
- [Page 508 "Blanket Sales Order Subform"](../../objects/page/508.md), Base Application: modified
- [Table 174 "Standard Purchase Line"](../../objects/table/174.md), Base Application: modified
- [Table 171 "Standard Sales Line"](../../objects/table/171.md), Base Application: modified
- [Table 1670 "Option Lookup Buffer"](../../objects/table/1670.md), Base Application: modified
- `src/Layers/BE/BaseApp/Sales/Document/SalesLine.Table.al`: modified, not in the BC30 snapshot
- `src/Layers/CH/BaseApp/Utilities/OptionLookupBuffer.Table.al`: modified, not in the BC30 snapshot
- `src/Layers/NA/BaseApp/Sales/Document/BlanketSalesOrderSubform.Page.al`: modified, not in the BC30 snapshot
- `src/Layers/NO/BaseApp/Sales/Document/BlanketSalesOrderSubform.Page.al`: modified, not in the BC30 snapshot

## Obsoletions

- Purchase Line: FormatType, replaced by FormatTypeAsText
- Sales Line: FormatType, replaced by FormatTypeAsText

## Context

- Work items: AB#645033
- Labels: Ownership: Needs Review, Team: Other
- Systems: sales, purchasing, platform

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