---
id: change/bcapps/11628
type: change
title: "#11628 Expense Agent: capture submission policy evaluation history"
summary: Expense Agent now captures policy evaluation history at the report level, storing outcomes and flagged categories in the activity log during submission and resubmission with deduplication per submission round.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - page expense activity log api
  - codeunit exp. policies to eval builder
  - codeunit expense activity log mgt.
  - table expense activity log entry
  - codeunit expense report approval mgmt
  - table expense report header
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:02:45.616Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 75913eb80c00d45c0463a4a32f9e746027508b67
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11628
    title: "microsoft/BCApps#11628: Expense Agent: capture submission policy evaluation history"
    date: "2026-10-01"
    commit: 75913eb80c00d45c0463a4a32f9e746027508b67
    t: null
    quote: Adds report-level policy evaluation summaries to expense activity history.
links:
  learn: []
  objects:
    - object/page/7122
    - object/codeunit/7107
    - object/codeunit/6926
    - object/table/7100
    - object/codeunit/6901
    - object/table/6906
    - object/table/6907
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11628
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11628
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-01T16:59:22Z"
author: t-prda
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - ExpenseManagement
  - "Team: Finance"
change_class: code
change_kind: feature
behavior_change: true
breaking: false
files:
  count: 10
  additions: 1690
  deletions: 30
  al: 7
apps:
  - ExpenseAgent
objects_touched:
  - key: page/7122
    page: page/7122
    type: page
    id: 7122
    name: Expense Activity Log API
    app: ExpenseAgent
    status: modified
  - key: codeunit/7107
    page: codeunit/7107
    type: codeunit
    id: 7107
    name: Exp. Policies To Eval Builder
    app: ExpenseAgent
    status: modified
  - key: codeunit/6926
    page: codeunit/6926
    type: codeunit
    id: 6926
    name: Expense Activity Log Mgt.
    app: ExpenseAgent
    status: modified
  - key: table/7100
    page: table/7100
    type: table
    id: 7100
    name: Expense Activity Log Entry
    app: ExpenseAgent
    status: modified
  - key: codeunit/6901
    page: codeunit/6901
    type: codeunit
    id: 6901
    name: Expense Report Approval Mgmt
    app: ExpenseAgent
    status: modified
  - key: table/6906
    page: table/6906
    type: table
    id: 6906
    name: Expense Report Header
    app: ExpenseAgent
    status: modified
  - key: table/6907
    page: table/6907
    type: table
    id: 6907
    name: Expense Report Line
    app: ExpenseAgent
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 12257
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/12257
fixes_issues: []
work_items:
  - 626515
  - 634361
systems:
  - development
quote: Adds report-level policy evaluation summaries to expense activity history.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #11628 Expense Agent: capture submission policy evaluation history

> Expense Agent now captures policy evaluation history at the report level, storing outcomes and flagged categories in the activity log during submission and resubmission with deduplication per submission round.

[Pull request](https://github.com/microsoft/BCApps/pull/11628) · merged into `main` (BC30) on 2026-10-01 by t-prda · 10 files (+1690 -30), 7 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- Report-level policy evaluation summaries are added to expense activity history
- Submission, resubmission and successful line evaluation confirmation invoke the history logger
- At most one PolicyEvaluated entry is written per submission round, only when policy evaluation is enabled and the report is pending approval
- Entries store the outcome, passed/failed counts and distinct flagged category codes, with a final '...' entry on overflow
- Snapshots are exposed through the existing read-only activity API and preserved through posting
- Behaviour changes for users or extensions.

## AL objects touched

- [Page 7122 "Expense Activity Log API"](../../objects/page/7122.md), ExpenseAgent: modified
- [Codeunit 7107 "Exp. Policies To Eval Builder"](../../objects/codeunit/7107.md), ExpenseAgent: modified
- [Codeunit 6926 "Expense Activity Log Mgt."](../../objects/codeunit/6926.md), ExpenseAgent: modified
- [Table 7100 "Expense Activity Log Entry"](../../objects/table/7100.md), ExpenseAgent: modified
- [Codeunit 6901 "Expense Report Approval Mgmt"](../../objects/codeunit/6901.md), ExpenseAgent: modified
- [Table 6906 "Expense Report Header"](../../objects/table/6906.md), ExpenseAgent: modified
- [Table 6907 "Expense Report Line"](../../objects/table/6907.md), ExpenseAgent: modified

## Also merged into

- [#12257](https://github.com/microsoft/BCApps/pull/12257) into `releases/29.x` on 2026-10-05

## Context

- Work items: AB#626515, AB#634361
- Labels: AL: Apps (W1), ExpenseManagement, Team: Finance
- Systems: development
- From the description: "Adds report-level policy evaluation summaries to expense activity history."

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