#14884 [Expense Agent] Replace the receipt of a corporate card expense
The Expense Agent now supports replacing receipts on corporate card expenses that already have one through an API-only feature, allowing users to swap receipts without removing the expense from reports or losing line edits.
- 10files
- 8AL files
- 8objects
Pull request · merged into main (BC30) on 2026-12-05 by claudiuciumedean · 10 files (+804 -27), 8 AL · feature · tier official · reviewed (checked by Opus)
What changed
- New replaceReceipt boolean flag on cardReceiptData and cardExpenseMatches API endpoints
- Replace flow deletes Lost Receipt declarations, removes old itemization and VAT lines, and swaps receipt in place with updated metadata
- Expenses with receipts, Lost Receipt declarations, or waiting for receipts can be matched or applied with the flag
- New CardReceiptReplace capability value lets clients detect backend support for receipt replacement
- Expense and report line status preserved through the operation with line IDs unchanged
- Behaviour changes for users or extensions.
AL objects touched
- Table 7420 “EA Card Expense Match Buffer”, ExpenseAgent: modified
- Page 7425 “EA Card Expense Matches API”, ExpenseAgent: modified
- Table 7427 “EA Card Receipt Data”, ExpenseAgent: modified
- Page 7421 “EA Card Receipt Data API”, ExpenseAgent: modified
- Codeunit 6906 “Expense Capabilities Provider”, ExpenseAgent: modified
- Enum 6984 “Expense Capability”, ExpenseAgent: modified
- Codeunit 7450 “EA Card Receipt Data Apply”, ExpenseAgent: modified
- Codeunit 7438 “EA Receipt Expense Match”, ExpenseAgent: modified
Context
- Work items: AB#630366
- Labels: AL: Apps (W1), ExpenseManagement, Team: Finance
- Systems: copilot
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).