[29.0][ExpenseAgent] Refactor agent setup for policies - #10958
Conversation
Good Sense Reviewer - Round 1Recommendation: Request ChangesWhat this PR doesThis change adds a setup field and exposes it in the setup pages and setup API so admins can control whether submitters can run policy evaluation before submission. The stored setting is present, but the submitter-facing evaluation path still appears to be controlled only by Evaluate Policies, and the new field is not read by the capability or API path that enables policy evaluation. Problem-solution fitFit: Partial The reported scenario needs a real opt-out for submitter-run policy checks. The diff adds configuration UI and API shape, but it does not yet make the runtime path honor the new opt-out. SuggestionsS1 (🔴 High): Submitter policy checks ignore the new setting Risk assessment and necessityRisk: The changed setup table, setup pages, and setup API affect Expense Agent policy evaluation and AI credit use. The schema change is additive, and no BaseApp event or Sales/Purchase/Service analogue is involved, but missing enforcement leaves the new admin control ineffective. Necessity: The change is needed to separate automatic policy evaluation from manual submitter checks. The scope is narrow, but it is incomplete until the submitter-run path uses the new setting.
|
What & why
Backports #10956 to
releases/29.0.Expense Agent admins should be able to disallow user-run policy checks.
Linked work
Fixes AB#648729
How I validated this
The backport applies cleanly, changes only the four files from #10956, has no whitespace errors, and has the same stable patch ID as the source commit. A local AL build wasn't run because BCContainerHelper and Docker aren't installed on this machine.
Risk & compatibility
This is a direct backport of #10956 with no release-specific changes.