---
id: change/bcapps/10807
type: change
title: "#10807 [29.x][Expense Agent] Confirm before closing Expense User Card without Employee No. "
summary: The Expense User card now prompts for confirmation before closing when the mandatory Employee No. field is left blank, preventing unintentional creation of unlinked expense users.
tier: official
language: en
tags:
  - fix
  - releases/29.x
  - bc29
  - page expense user
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:06:43.037Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: b4793511e89b6d102bbda56f020344a04102220a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10807
    title: "microsoft/BCApps#10807: [29.x][Expense Agent] Confirm before closing Expense User Card without Employee No. "
    date: "2026-09-02"
    commit: b4793511e89b6d102bbda56f020344a04102220a
    t: null
    quote: Employee No. is blank. The expense user will not be linked to an employee. Are you sure you want to exit?
links:
  learn: []
  objects:
    - object/page/6949
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10807
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10807
kind: pr
base_branch: releases/29.x
major: "29"
merged_at: "2026-09-02T12:29:12Z"
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:
  - 648361
systems:
  - development
quote: Employee No. is blank. The expense user will not be linked to an employee. Are you sure you want to exit?
joined_against:
  major: "29"
  commit: 1d24dd5ee2a734510f0556ccc69342d0e616db2f
---

# #10807 [29.x][Expense Agent] Confirm before closing Expense User Card without Employee No. 

> The Expense User card now prompts for confirmation before closing when the mandatory Employee No. field is left blank, preventing unintentional creation of unlinked expense users.

[Pull request](https://github.com/microsoft/BCApps/pull/10807) · merged into `releases/29.x` (BC29) 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 page 6949 to intercept close actions
- User receives confirmation dialog when Employee No. is blank before the card closes
- Prevents silent saving of expense users without being linked to an employee
- Test cases updated to handle the new confirmation dialog with appropriate handlers
- Behaviour changes for users or extensions.

## AL objects touched

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

## Context

- Work items: AB#648361
- Labels: AL: Apps (W1), Team: Finance
- Systems: development
- From the description: "Employee No. is blank. The expense user will not be linked to an employee. Are you sure you want to exit?"

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