Skip to content

[29.x] Clarify Expense Agent and expense management setup - #11613

Merged
Prangshuman Das (t-prda) merged 2 commits into
releases/29.xfrom
t-prda-backport-650544-expense-setup-29x
Sep 19, 2026
Merged

Prangshuman Das (t-prda) merged 2 commits into
releases/29.xfrom
t-prda-backport-650544-expense-setup-29x

Conversation

@t-prda

@t-prda Prangshuman Das (t-prda) commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

What & why

Backport merged #11541 to releases/29.x for users who need help reaching the correct Expense Agent configuration page.

Cherry-picked the authoritative squash commit 9f382f608fab7e117cfeb1e33fa9f70259386bfa with -x provenance. Retains all five source AL changes: Expense Management Setup naming and hidden Pending agent controls; wizard reminder settings and default-off incoming/outgoing communication; selected Canary routing; staged stale-account cleanup; Only Shortest Route placement; communication-status naming/navigation; and generated telemetry ID 0000VGO.

The only release adaptation changes the 20 newly introduced ObsoleteTag = '30.0' values to 29.0 and seven newly introduced CLEAN30 guards to CLEAN29. Existing obsoletions and release-specific Entra application behavior are preserved.

Linked work

Fixes AB#650544

29.x backport work item.

Original merged PR: #11541

Original source work item (reference only): AB#640269.

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.

What I tested and the outcome

  • The cherry-pick applied without conflicts. Stable Git patch IDs matched the authoritative squash commit before the release adaptation.
  • Source/diff checks verified exactly the five expected AL paths, exactly seven new cleanup guards and 20 new obsoletion tags adapted, no conflict markers, and telemetry ID 0000VGO retained. git diff --check origin/releases/29.x HEAD passed.
  • No local build, compilation, publishing, runtime validation, or test execution was performed, as explicitly requested by the change owner. CI build/test verification is pending, not claimed passed.
  • No new tests were added for this direct backport at the change owner's request. Existing tests and dependencies are unchanged.
  • No release-29 app was published over the local release-30 environment; the local environment was not modified.

Risk & compatibility

Only the original five AL files change. App/runtime versions, manifests, tables, schema, API objects, permissions/access controls, tests, and configuration files are unchanged. No additional fixes or data migration are included.

Newly Pending controls now use the release-29 cleanup boundary. Registration/unregistration retains the source change's selected-endpoint behavior; switching Canary does not migrate an existing registration. Missing setup retains the source diagnostic/no-send behavior. CI and release review remain required before merge.

Expense Management Setup Page (show more hidden):
<img width="600" height="500" alt="image"
src="https://github.com/user-attachments/assets/83649c8e-5b4e-443d-85b8-5b05e19eeddd"
/>

Expense Management Setup Page (with show more):
<img width="600" height="500" alt="image"
src="https://github.com/user-attachments/assets/7388dcc2-6aac-4633-a4c1-57040a9adbe8"
/>

Expense Agent config page (new fields):
<img width="428" height="293" alt="image"
src="https://github.com/user-attachments/assets/7eed65c7-0fce-46a4-b7b1-05052d1c5c66"
/>

Expense agent card notification:
<img width="528" height="212" alt="image"
src="https://github.com/user-attachments/assets/46554840-ea4f-4e12-b05d-65b812b2e3a0"
/>

Expense Agent Status -> Expense Agent Communication Status:
<img width="547" height="194" alt="image"
src="https://github.com/user-attachments/assets/c64688fc-4e1b-46f7-b1aa-ae2a31d2b1c6"
/>

<!--
Thanks for contributing to BCApps!

A few things before you hit "Create pull request":
- Your PR must link to an approved issue. New here? See CONTRIBUTING.md.
- You must have built and run your change yourself. CI is a safety net,
not a substitute.
- If you used AI or an agent to write this PR, you are still the author.
Read the diff,
  build it, and try it before requesting review.

Contributing guide:
https://github.com/microsoft/BCApps/blob/main/CONTRIBUTING.md
Local dev environment:
https://github.com/microsoft/BCApps/blob/main/LOCAL_DEV_ENV.md
-->

## What & why

<!-- A few sentences: what does this change do, and what problem does it
solve? -->

Separate agent configuration from general expense/accounting setup
without changing object identities or consolidating access permissions.

- Keep page 6996 (`Expense Agent Setup`) searchable as **Expense
Management Setup**. Hide and mark redundant public
agent/communication/AI-policy/project controls Pending for 30.0 under
`CLEAN30`, preserving their names until cleanup. Ordinary expense rules
remain on both setup surfaces; custom access controls and the existing
Configure All Agents permission guard are unchanged.
- Group receipt/merchant requirements with ordinary rules, place
employee creation and the normally visible VAT business posting group
ahead of read-only applied-status indicators, and move
number-series/rule indicators to their corresponding groups. Preserve
**View agent consumption** and add unpromoted **View communication
status** navigation; page 7076 becomes **Expense Agent Communication
Status**. Update the existing Agent Card notification wording, without
adding a management-page setup nudge.
- Keep first-time/existing Configure routes on wizard 6991. New setups
retain false defaults for incoming receipts and outgoing communication,
without resetting saved choices. Add weekly/monthly/custom reminder
details with short captions, date-formula help, and frequency-specific
`Enabled` conditions; retain dirty tracking without an explicit page
refresh.
- Move **Only Shortest Route** into the wizard's mileage section,
inheriting the existing table caption/tooltip and preserving the
setting's behavior. Retain its old management-page control as
hidden/Pending under `CLEAN30`.
- Move stale-account repair off the general setup page and stage it in
the wizard's temporary record. Do not validate deactivation or cancel
live tasks while opening the wizard; explicit Update uses the existing
persistence/scheduling path and Cancel discards staged repairs.
- Pass the selected Canary Boolean explicitly to
registration/unregistration endpoint selection, including `false`,
without an early database write or extra commit. Operational requests
read saved routing settings, but missing setup clears the URL, logs a
diagnostic, and returns false instead of defaulting to production.

## Linked work

<!-- Required: link an approved GitHub issue using "Fixes #<number>".
Microsoft contributors: also link the ADO work item with "AB#<number>"
if you have one. -->

Fixes
[AB#640269](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/640269)
([work
item](https://dev.azure.com/dynamicssmb2/Dynamics%20SMB/_workitems/edit/640269)).

## How I validated this

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

**What I tested and the outcome** *(required — be specific: scenarios,
commands, screenshots for UI changes)*

<!-- Example:
- Ran the new "Post and Send" action on a sales invoice in a fresh
container; document posted and email queued (see screenshot).
- New unit tests in MyFeatureTest.Codeunit.al pass locally; full module
test suite green.
- No tests added because change is comment-only / refactor with existing
coverage. -->

- Before the telemetry review follow-up, the production app at
`4a16433d70` was built with AL MCP `al_build` in default and `CLEAN30`
configurations, using CodeCop, UICop, AppSourceCop,
PerTenantExtensionCop, and the common analyzer with the repository base
ruleset. Both succeeded without reported warnings. Compiler
18.0.41.8481; local platform 29.0.54249.0; application packages
30.0.0.0. No manifest version changes.
- Published only that pre-follow-up default package locally to
`Navision_NAV` with `al_publish(skipBuild=true,
schemaUpdateMode=Synchronize, forceUpgrade=true)`. Server readback
matched the package hash and all five embedded modified AL sources,
including the shortest-route follow-up. SHA-256:
`E310A5A375C6267C6B22FA5256294F7E7C5E8D3363B0C96B020A52E96F790061`;
build timestamp: `2026-09-16T02:59:04.8430754Z`. This published package
predates telemetry ID `0000VGO`.
- Telemetry review follow-up `3fc21154a1` was validated against the PR
worktree with all five analyzers: default AL MCP `al_build` passed with
`warnings: []`; canonical NAV `Compile-ALProject` with cumulative
`CLEAN15` through `CLEAN30` and the generated CLEAN ruleset passed with
`issues: []`. The default package is 1,058,358 bytes, SHA-256
`D24C56C59FBAF4AB4E7DB516752EDE6E3EF19C67E02AE789C4FFE59E8A0415AD`; all
five embedded modified AL sources match the worktree. The CLEAN package
is 1,048,107 bytes, SHA-256
`E79B9973955B04597CF2C8F8ED90683FEFB3961A1D84E2744F8C08D6D1D40EBF`; its
embedded telemetry source also matches. Neither follow-up package was
published, and no source manifest was changed for validation.
- No new tests were added at the change owner's request; no automated
test suite was run. Existing tests and dependencies are unchanged.
Source-level checks covered explicit Canary true/false propagation,
saved-value preservation, and enabled-only reminder conditions; these
are not runtime/SaaS tests.
- User UI feedback/screenshots informed the layout. Full independent
manual verification remains pending, including stale-account
Update/Cancel behavior. No live canary/production registration or
unregistration requests were made for validation. The telemetry-only
follow-up adds no new runtime/UI validation claim.

## Risk & compatibility

<!-- Anything reviewers should watch for: breaking changes, upgrade/data
impact, permissions,
telemetry, feature flags, follow-up work. Write "None" if there's
nothing to call out. -->

- Object IDs, underlying fields, API schemas, custom Can Configure/Can
Work on Behalf access, and permission guards remain intact. Public page
controls use Pending obsoletion rather than immediate removal. No data
migration/backport is included.
- Register/unregister on Update follow the **currently selected
endpoint**. Toggling Canary does not automatically migrate an existing
registration or clean up a previous endpoint. Background calls retain
saved routing, except that missing setup now fails without sending.
- The missing-setup telemetry event ID is `0000VGO`, generated in
`3fc21154a1` by canonical `Expand-TelemetryTags -SourceFilePaths` scoped
only to `EAHttpClient.Codeunit.al` (EnlistmentScripts 1.0.26154.1).
Generation replaced one tag; the same file's `-WhatIf` check reported
zero remaining tags. The installed pre-commit hook had only checked
branch state and had not expanded the original placeholder; no ID was
invented and no hook was bypassed.
- Running-dispatcher rescheduling/recovery, explicit mailbox-clear
dependent-toggle cleanup, access consolidation, and release-29 alignment
remain separate follow-ups; this PR does not claim to resolve them.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7a535d01-fbef-4fb8-b5e9-ad0c29f2921c
(cherry picked from commit 9f382f6)
Adapt only the 20 ObsoleteTag values and 7 CLEAN guards introduced by #11541. Preserve existing release behavior and app/runtime versions.

Fixes AB#650544

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7a535d01-fbef-4fb8-b5e9-ad0c29f2921c

Copilot-Session: 8bd8fcfc-ad21-453f-b3cc-a6a70b6c9242
@t-prda
Prangshuman Das (t-prda) requested a review from a team as a code owner September 18, 2026 13:52
@github-actions github-actions Bot added 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 18, 2026
@github-actions github-actions Bot added this to the Version 29.1 milestone Sep 18, 2026
@t-prda Prangshuman Das (t-prda) added Team: Finance GitHub request for Finance area and removed Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction labels Sep 18, 2026
@github-actions github-actions Bot added Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction and removed Team: Finance GitHub request for Finance area labels Sep 18, 2026
@t-prda
Prangshuman Das (t-prda) merged commit a66254c into releases/29.x Sep 19, 2026
171 checks passed
@t-prda
Prangshuman Das (t-prda) deleted the t-prda-backport-650544-expense-setup-29x branch September 19, 2026 11:15
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 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.

3 participants