Skip to content

[29.0] bug 648733 - Add integration event for updating original document VAT date in General Ledger Setup CZL - #10972

Merged
David Holuša (DavidHolusa) merged 2 commits into
releases/29.0from
bugs/648733-290-EventRequest
Sep 4, 2026
Merged

[29.0] bug 648733 - Add integration event for updating original document VAT date in General Ledger Setup CZL#10972
David Holuša (DavidHolusa) merged 2 commits into
releases/29.0from
bugs/648733-290-EventRequest

Conversation

@DavidHolusa

@DavidHolusa David Holuša (DavidHolusa) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

What & why

The UpdateOriginalDocumentVATDateCZL procedure in the "General Ledger Setup" table currently does not allow extension with custom logic. This procedure is called from handlers in Codeunit 11744 when source fields change (posting date, document date, VAT date) and sets the value of the "Original Doc. VAT Date CZL" field in Purchase Header based on the "Default Orig.Doc. VAT Date CZL" setting. The call chain handler → UpdateOriginalDocumentVATDateCZL → validation provides no extensibility point to modify the behavior.

The integration event for updating original document VAT date in General Ledger Setup CZL has been added

Linked work

Fixes AB#648733

@DavidHolusa
David Holuša (DavidHolusa) requested a review from a team September 2, 2026 20:05
@DavidHolusa
David Holuša (DavidHolusa) requested a review from a team as a code owner September 2, 2026 20:05
@github-actions github-actions Bot added the Team: Finance GitHub request for Finance area label Sep 2, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Sep 2, 2026
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Request Changes

What this PR does

The change adds an integration event in GeneralLedgerSetupCZL.TableExt.al after the default logic that updates the original document VAT date. The event runs before the callers validate the field, so subscribers can still change the final date before validation.

The placement is not enough for a true override point. If the default setting matches, the old value is replaced before the event runs, so a subscriber cannot choose to keep the previous value.

Problem-solution fit

Fit: Partial

The requested behavior is an override point for UpdateOriginalDocumentVATDateCZL. The diff adds an after-event that can adjust the resulting date, but it does not let subscribers skip the default assignment when that assignment already changed the value.

Suggestions

S1 (🔴 High): Add a handled override point before assignment
This event is raised after the default assignment. If the default setting matches, the old OriginalDocumentVATDate value is already lost, so a subscriber cannot choose to leave it unchanged. Add a before event with a �ar IsHandled check before the assignment, or move this event before the assignment and honor IsHandled.

Risk assessment and necessity

Risk: The standard behavior is unchanged, but the new event becomes a public extension contract. If it ships in this shape, subscribers that need to suppress the default assignment still cannot implement the scenario, and changing the event shape later would be harder.

Necessity: A customization point here is needed because several purchase date flows call this shared update procedure before validation. The scope is small and appropriate, but the event contract needs to support the override use case before merge.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=10972 round=1 by=alexei-dobriansky at=2026-09-03T01:15:18.7784271Z lastSha=8f2b6fdac4355a6dfab1dd05ec4503b15ee266c2 reviewKey=4aecb2d1296f70a7516160d736c5d8eb646e815f054a65ded38993122429cd09 suggestions=S1@f0468e31

@DavidHolusa
David Holuša (DavidHolusa) merged commit 9c77375 into releases/29.0 Sep 4, 2026
17 checks passed
@DavidHolusa
David Holuša (DavidHolusa) deleted the bugs/648733-290-EventRequest branch September 4, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team: Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants