#13499 [Expense Agent] Defer per-diem policy invalidation until the parent line is saved
Per-diem policy invalidation on expense report lines is deferred until the parent record saves, preventing stale parent buffers when child records are added during bulk generation. Policy state changes are now coalesced into a single version increment rather than multiple invalidations.
- 4files
- 3AL files
- 3objects
Pull request · merged into main (BC30) on 2026-11-10 by encimita · 4 files (+561 -12), 3 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Child-record insert/modify/delete triggers retain normal policy invalidation for direct API calls
- Parent invalidation is suppressed only for local child instances used by bulk generation
- Pending child-detail changes are marked on the parent buffer and consumed during parent save
- Policy evaluation confirmation is rejected if pending child changes haven’t been saved yet
- Four new tests cover location-triggered generation, child-only regeneration, date-range extension, and pending change validation
- Behaviour changes for users or extensions.
AL objects touched
- Table 6907 “Expense Report Line”, ExpenseAgent: modified
- Table 6909 “Expense Report Line Per Diem”, ExpenseAgent: modified
- Codeunit 6912 “Expense Auto Population”, ExpenseAgent: modified
Context
- Work items: AB#648711
- Labels: AL: Apps (W1), Team: Finance
- Systems: copilot
- From the description: “Suppress parent invalidation only on the local child-record instance used by bulk generation; retain the child insert trigger and its existing validations.”
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Set Up Per Diem and Mileage Allowances — possibly related: Documents per diem allowance setup and configuration for expense management. (model-linked)
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).