---
id: change/bcapps/10638
type: change
title: "#10638 [Master] [Expense Agent] Bug 639921 Confirm before closing Expense User Card without Employee No."
summary: The Expense User card now prompts for confirmation when closing without selecting an employee, preventing accidental creation of unlinked expense user records.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - page expense user
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:06:32.163Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: dcf753455d8c4a6dbc3afc511a78cefbe3ce00b0
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10638
    title: "microsoft/BCApps#10638: [Master] [Expense Agent] Bug 639921 Confirm before closing Expense User Card without Employee No."
    date: "2026-09-02"
    commit: dcf753455d8c4a6dbc3afc511a78cefbe3ce00b0
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/page/6949
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10638
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10638
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-02T14:20:53Z"
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: 2
  additions: 13
  deletions: 0
  al: 1
apps:
  - ExpenseAgent
objects_touched:
  - key: page/6949
    page: page/6949
    type: page
    id: 6949
    name: Expense User
    app: ExpenseAgent
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 639921
systems:
  - development
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10638 [Master] [Expense Agent] Bug 639921 Confirm before closing Expense User Card without Employee No.

> The Expense User card now prompts for confirmation when closing without selecting an employee, preventing accidental creation of unlinked expense user records.

[Pull request](https://github.com/microsoft/BCApps/pull/10638) · merged into `main` (BC30) on 2026-09-02 by v-rohangarg20 · 2 files (+13 -0), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Added OnQueryClosePage trigger to validate Employee No. field before closing
- User receives confirmation dialog when trying to close with blank Employee No.
- Prevents silent creation of expense users not linked to an employee
- Tests updated with handler functions to manage confirmation dialogs
- Behaviour changes for users or extensions.

## AL objects touched

- [Page 6949 "Expense User"](../../objects/page/6949.md), ExpenseAgent: modified

## Context

- Work items: AB#639921
- 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).
