Align the Vend. Entry-Edit post-modify event with its Cust. Entry-Edit counterpart#9098
Open
Franco111000 wants to merge 1 commit into
Open
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.