---
id: change/bcapps/10451
type: change
title: "#10451 [Bug 647233] Fix User Confirmed copied into Canceled when posting expense report lines"
summary: Fixed a data corruption bug where the User Confirmed field from expense report lines was being incorrectly copied into the Canceled field of posted expense report lines during posting, by introducing a new non-colliding field and adding data migration logic.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit cancel posted expense report
  - table posted expense report line
  - codeunit upgrade expense agent setup
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:07:35.899Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 34769a41b641034a23f3d0751251933b58bc691c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10451
    title: "microsoft/BCApps#10451: [Bug 647233] Fix User Confirmed copied into Canceled when posting expense report lines"
    date: "2026-08-24"
    commit: 34769a41b641034a23f3d0751251933b58bc691c
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/6974
    - object/table/6916
    - object/codeunit/6978
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10451
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10451
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-24T19:56:21Z"
author: v-rohangarg20
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Finance"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 119
  deletions: 3
  al: 3
apps:
  - ExpenseAgent
objects_touched:
  - key: codeunit/6974
    page: codeunit/6974
    type: codeunit
    id: 6974
    name: Cancel Posted Expense Report
    app: ExpenseAgent
    status: modified
  - key: table/6916
    page: table/6916
    type: table
    id: 6916
    name: Posted Expense Report Line
    app: ExpenseAgent
    status: modified
  - key: codeunit/6978
    page: codeunit/6978
    type: codeunit
    id: 6978
    name: Upgrade Expense Agent Setup
    app: ExpenseAgent
    status: modified
objects_unjoined: []
obsoletions:
  - object: Posted Expense Report Line
    member: Canceled
    replacement: Is Canceled
backports: []
fixes_issues: []
work_items:
  - 647233
systems:
  - development
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10451 [Bug 647233] Fix User Confirmed copied into Canceled when posting expense report lines

> Fixed a data corruption bug where the User Confirmed field from expense report lines was being incorrectly copied into the Canceled field of posted expense report lines during posting, by introducing a new non-colliding field and adding data migration logic.

[Pull request](https://github.com/microsoft/BCApps/pull/10451) · merged into `main` (BC30) on 2026-08-24 by v-rohangarg20 · 4 files (+119 -3), 3 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Field 92 is User Confirmed on Expense Report Line but Canceled on Posted Expense Report Line, so TransferFields copied confirmation into Canceled
- Canceled (field 92) is obsoleted as Pending and replaced by new field 94 Is Canceled
- Cancel Posted Expense Report now uses Is Canceled
- Upgrade code in UpgradeExpenseAgentSetup migrates existing Canceled data to the new field
- Regression test checks that posting a confirmed line does not mark the posted line canceled
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 6974 "Cancel Posted Expense Report"](../../objects/codeunit/6974.md), ExpenseAgent: modified
- [Table 6916 "Posted Expense Report Line"](../../objects/table/6916.md), ExpenseAgent: modified
- [Codeunit 6978 "Upgrade Expense Agent Setup"](../../objects/codeunit/6978.md), ExpenseAgent: modified

## Obsoletions

- Posted Expense Report Line: Canceled, replaced by Is Canceled

## Context

- Work items: AB#647233
- Labels: AL: Apps (W1), Team: Finance
- Systems: development

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