[29.0] bug 648733 - Add integration event for updating original document VAT date in General Ledger Setup CZL - #10972
Conversation
…ral Ledger Setup CZL
Good Sense Reviewer - Round 1Recommendation: Request ChangesWhat this PR doesThe 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 fitFit: 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. SuggestionsS1 (🔴 High): Add a handled override point before assignment Risk assessment and necessityRisk: 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.
|
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