[Extensibility Request] issue 8910: expose preview mode on purchase post events - #11080
business-central-extensibility-bot[bot] wants to merge 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@business-central-extensibility-bot[bot] please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7fd29cf0-bf3b-4d3b-98f6-c1a286323ca8
Good Sense Reviewer - Round 1Recommendation: Request ChangesWhat this PR doesThis change adds The other requested purchase posting event remains unchanged. As a result, the change solves standard purchase preview handling but not the warehouse preview path that reaches Problem-solution fitFit: Partial The reported scenario requires preview state on two purchase posting events. The diff exposes it on only one of them, leaving the second scenario unresolved. SuggestionsS1 (🔴 High): Expose preview mode on the second event Risk assessment and necessityRisk: The added parameter is applied consistently across all ten changed layers and is safe for existing event subscribers. The unresolved risk is that Necessity: Exposing the actual preview state is needed to prevent subscriber side effects during preview. The current scope is incomplete because only one of the two required event paths receives that state.
|
Summary
Purchase posting event subscribers need to distinguish actual posting from preview posting so they can avoid running side effects during previews. This change exposes the existing preview state on the two approved purchase posting events while preserving the non-preview behavior of the Purchase Header wrapper.
Changes Made
Purch.-Post.OnAfterProcessPurchLines- AppendedPreviewModeand passed the posting codeunit state, propagated to existing layer counterparts.Purch.-Post.OnAfterPostPurchaseDoc- AppendedPreviewModeand passed the posting codeunit state, propagated to existing layer counterparts.Purchase Header.TriggerOnAfterPostPurchaseDoc- Passedfalsebecause this wrapper represents non-preview posting, propagated to existing layer counterparts.Fixes #8910
Important
AI-generated: content may be inaccurate or incomplete. Please review and verify before relying on or merging.