Skip to content

[29.x] [Agent Archiving] Payables and Expense agent implementation for IAgentArchiving - #11195

Merged
Thaddeus Loke (thloke) merged 1 commit into
releases/29.xfrom
backport/11040-agent-archiving-releases-29
Sep 10, 2026
Merged

[29.x] [Agent Archiving] Payables and Expense agent implementation for IAgentArchiving#11195
Thaddeus Loke (thloke) merged 1 commit into
releases/29.xfrom
backport/11040-agent-archiving-releases-29

Conversation

@thloke

@thloke Thaddeus Loke (thloke) commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What & why

Backport of #11040 to releases/29.x.

Honours the IAgentArchiving interface and opts Payables Agent and Expense Agent out of archiving. The Archive action is disabled for unsupported agent types, and Agent.Archive enforces the same guard programmatically.

Payables and Expense register dedicated archiving implementations that report archiving as unsupported. Existing behavior is unchanged for agent types that do not opt out.

Linked work

AB#647379

Backport

Cherry-picked the merged change from #11040:

  • c6d92043e9eb44b17427aa9cc91ae91a322b1f29

The change applied cleanly with no conflicts or hand edits. Its stable patch ID matches the source PR exactly.

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

The original regression tests from #11040 are included unchanged. git diff --check passes, and the backport has the same stable patch ID as the merged source change.

Risk & compatibility

The corresponding platform support for IAgentArchiving must be present in the 29.x platform artifact. No schema changes are included.

…tArchiving (#11040)

## What & why

Honours the new `IAgentArchiving` interface, and opts Payables Agent and
Expense Agent out of archiving.

The Archive action is disabled on the Agent List and Agent Card for
agent types that do not support archiving, and `Agent.Archive` blocks it
programmatically so the guard cannot be bypassed. The check runs off the
record the pages already hold, so it costs no extra read and cannot fail
on an unsaved record.

Payables and Expense opt out via their own `PA Agent Archiving` / `EA
Agent Archiving` codeunits, mirroring how each app already registers
`IAgentTaskExecution`, so they can be removed cleanly once each agent
supports archiving. Both are single-instance: the setup record enforcing
that is left behind by archiving, which would block creating a
replacement.

Behaviour is unchanged for every agent type that does not opt out.

## Linked work


[AB#647379](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/647379)

## Related PRs

Cross-repo change - merge in this order:

1. **BC-Platform** - the interface:
https://microsoft.ghe.com/bic/BC-Platform/pull/46005
2. **BCApps** - System App honours it, Payables and Expense opt out
(this PR): #10460

> Note: this PR will not build until 1 is merged and a platform version
carrying `IAgentArchiving` flows through.

---------

Co-authored-by: Balázs Krupinszki <bkrupinszki@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Copilot-Session: 9724257d-43d1-468b-9f97-1fb863d2fdd1
@thloke
Thaddeus Loke (thloke) requested review from a team September 8, 2026 07:18
@github-actions github-actions Bot added AL: System Application AL: Apps (W1) Add-on apps for W1 Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction Team: Other GitHub request for other area than SCM, Finance or Integration labels Sep 8, 2026
@github-actions github-actions Bot added this to the Version 29.1 milestone Sep 8, 2026
@thloke
Thaddeus Loke (thloke) enabled auto-merge (squash) September 9, 2026 01:31
@thloke
Thaddeus Loke (thloke) merged commit a19566c into releases/29.x Sep 10, 2026
332 of 333 checks passed
@thloke
Thaddeus Loke (thloke) deleted the backport/11040-agent-archiving-releases-29 branch September 10, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 AL: System Application Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction Team: Other GitHub request for other area than SCM, Finance or Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants