---
id: change/bcapps/11040
type: change
title: "#11040 [Agent Archiving] Payables and Expense agent implementation for IAgentArchiving"
summary: Payables and Expense agents now implement the IAgentArchiving interface to opt out of archiving, with the System Application enforcing archiving restrictions on the Agent List and Agent Card pages.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - codeunit ea agent archiving
  - enumextension ea agent metadata
  - codeunit pa agent archiving
  - enumextension pa agent metadata
  - codeunit agent
  - page agent card
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:06:15.279Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: c6d92043e9eb44b17427aa9cc91ae91a322b1f29
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11040
    title: "microsoft/BCApps#11040: [Agent Archiving] Payables and Expense agent implementation for IAgentArchiving"
    date: "2026-09-07"
    commit: c6d92043e9eb44b17427aa9cc91ae91a322b1f29
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/7104
    - object/enumextension/6998
    - object/codeunit/3319
    - object/enumextension/3304
    - object/codeunit/4321
    - object/page/4315
    - object/codeunit/4301
    - object/page/4316
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11040
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11040
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-07T09:53:53Z"
author: thloke
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "AL: System Application"
  - "Ownership: Needs Review"
  - "Team: Other"
change_class: code
change_kind: feature
behavior_change: true
breaking: false
files:
  count: 12
  additions: 137
  deletions: 6
  al: 8
apps:
  - ExpenseAgent
  - PayablesAgent
  - System Application
objects_touched:
  - key: codeunit/7104
    page: codeunit/7104
    type: codeunit
    id: 7104
    name: EA Agent Archiving
    app: ExpenseAgent
    status: added
  - key: enumextension/6998
    page: enumextension/6998
    type: enumextension
    id: 6998
    name: EA Agent Metadata
    app: ExpenseAgent
    status: modified
  - key: codeunit/3319
    page: codeunit/3319
    type: codeunit
    id: 3319
    name: PA Agent Archiving
    app: PayablesAgent
    status: added
  - key: enumextension/3304
    page: enumextension/3304
    type: enumextension
    id: 3304
    name: PA Agent Metadata
    app: PayablesAgent
    status: modified
  - key: codeunit/4321
    page: codeunit/4321
    type: codeunit
    id: 4321
    name: Agent
    app: System Application
    status: modified
  - key: page/4315
    page: page/4315
    type: page
    id: 4315
    name: Agent Card
    app: System Application
    status: modified
  - key: codeunit/4301
    page: codeunit/4301
    type: codeunit
    id: 4301
    name: Agent Impl.
    app: System Application
    status: modified
  - key: page/4316
    page: page/4316
    type: page
    id: 4316
    name: Agent List
    app: System Application
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 11195
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/11195
fixes_issues: []
work_items:
  - 647379
systems:
  - copilot
  - development
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #11040 [Agent Archiving] Payables and Expense agent implementation for IAgentArchiving

> Payables and Expense agents now implement the IAgentArchiving interface to opt out of archiving, with the System Application enforcing archiving restrictions on the Agent List and Agent Card pages.

[Pull request](https://github.com/microsoft/BCApps/pull/11040) · merged into `main` (BC30) on 2026-09-07 by thloke · 12 files (+137 -6), 8 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- Payables Agent and Expense Agent opt out of archiving through dedicated codeunits
- Archive action is disabled on Agent List and Agent Card for agents that do not support archiving
- Agent.Archive method blocks archiving programmatically to prevent bypassing UI restrictions
- Each agent registers its archiving preference similar to how they register IAgentTaskExecution
- No behavior change for agents that do not opt out
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 7104 "EA Agent Archiving"](../../objects/codeunit/7104.md), ExpenseAgent: added
- [Enum extension 6998 "EA Agent Metadata"](../../objects/enumextension/6998.md), ExpenseAgent: modified
- [Codeunit 3319 "PA Agent Archiving"](../../objects/codeunit/3319.md), PayablesAgent: added
- [Enum extension 3304 "PA Agent Metadata"](../../objects/enumextension/3304.md), PayablesAgent: modified
- [Codeunit 4321 "Agent"](../../objects/codeunit/4321.md), System Application: modified
- [Page 4315 "Agent Card"](../../objects/page/4315.md), System Application: modified
- [Codeunit 4301 "Agent Impl."](../../objects/codeunit/4301.md), System Application: modified
- [Page 4316 "Agent List"](../../objects/page/4316.md), System Application: modified

## Also merged into

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

## Context

- Work items: AB#647379
- Labels: AL: Apps (W1), AL: System Application, Ownership: Needs Review, Team: Other
- Systems: copilot, 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).
