Let subscribers override the half-year new year date in SetHalfYearConventionMethod - #10337
Let subscribers override the half-year new year date in SetHalfYearConventionMethod#10337Jatin Kumar (Explorer986) wants to merge 1 commit into
Conversation
|
All five country-layer copies (FR/GB/IT/RU/W1) of codeunit 5611 "Calculate Normal Depreciation" change the shipped IntegrationEvent OnBeforeSetHalfYearConventionMethod's existing NewYearDate parameter from by-value (NewYearDate: Date) to by-reference (var NewYearDate: Date). Even though the publisher is Knowledge:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.33.4 |
ad0c841 to
55611ea
Compare
What & why
Codeunit 5611 raises OnBeforeSetHalfYearConventionMethod, but NewYearDate was passed by value and then always overwritten with the accounting period start. So a subscriber could set it, but it never took effect.
This keeps the existing event signature unchanged and appends a trailing var NewYearDateOverride parameter. When a subscriber sets it, the base uses that date instead of the accounting period start. With no subscriber the behavior is unchanged. The same change is applied to every copy of codeunit 5611, so the event behaves the same across the W1, FR, GB, IT, and RU layers.
Fixes AB#646465
How I validated this
What I tested and the outcome
No test added since this is an additive event parameter with existing coverage.
Risk & compatibility
Additive and non-breaking. The existing event keeps its shipped signature, a trailing var NewYearDateOverride parameter is appended, and existing subscribers that omit it continue to compile.