Align the Vend. Entry-Edit post-modify event with its Cust. Entry-Edit counterpart#9098
Conversation
…unterpart Codeunit 113 raised the misspelled OnRunOnAfterVendLedgEntryMofidy event with only the modified entry, while codeunit 103 raises OnRunOnAfterCustLedgEntryModify with both the record passed to the codeunit and the modified entry. Add OnRunOnAfterVendLedgEntryModify with the same shape as the customer event and obsolete the misspelled event, keeping it raised until CLEAN29. Applied to W1 and all country layer copies.
Copilot PR ReviewIteration 1 · Outcome: completed Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630 Findings by domainFindings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).
Totals: 0 knowledge-backed · 1 agent findings. Orchestrator pre-filter (13 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
Agentic PR Review - Round 1Recommendation: AcceptWhat this PR doesThis PR adds the correctly named The new vendor event matches the SuggestionsNo blocking or optional suggestions. Risk assessment and necessityRisk: This is a public BaseApp integration event change, so subscriber compatibility is the main risk. I verified the publishers and call sites in Necessity: No
|
What & why
Codeunit 113 "Vend. Entry-Edit" raises
OnRunOnAfterVendLedgEntryMofidyafter the vendor ledger entry is modified. The event name is misspelled, and it only exposes the modified entry. Its counterpart in codeunit 103 "Cust. Entry-Edit",OnRunOnAfterCustLedgEntryModify, passes both the record given to the codeunit and the modified entry, so vendor-side subscribers get less context than customer-side subscribers for the same hook point.This change adds
OnRunOnAfterVendLedgEntryModifywith the exact shape of the customer event (both records passed by var, XML documentation mirroring the customer wording) and obsoletes the misspelled event with the standard#if not CLEAN29pattern. The misspelled event is still declared and raised until cleanup, so existing subscribers keep working and get the usual obsolete warning pointing to the replacement. The country layers that carry full copies of the codeunit (APAC, CH, IT, NA, NL, NO, RU) receive the identical change, following the established practice of propagating W1 fixes to the localization layers.Linked work
Fixes #8316
How I validated this
What I tested and the outcome
OnRunOnAfterCustLedgEntryModifyin codeunit 103: first parameter is the record passed to the codeunit, second is the modified entry, both by var, raised immediately afterModify().OnRunOnAfterVendLedgEntryMofidy: the only occurrences are the declaration and the raise in the eight copies of the codeunit itself. No app or test subscribes to it, so the obsoletion cannot break in-repo code.#if not CLEAN29, new event raised unconditionally), for exampleOnBeforeCalculateAndGetPlanningCompListin CalcItemPlanPlanWksh.Codeunit.al from the 27.0 wave.Risk & compatibility
Modify()and beforeRec := VendLedgEntry, so both events observe the same record state.Fixes AB#641574