[main] features 640066 Add integration events for events for CZ Adv. Payment and CZ Cash Desk - #10079
[main] features 640066 Add integration events for events for CZ Adv. Payment and CZ Cash Desk#10079v-janpopr wants to merge 6 commits into
Conversation
…nce mandatory fields check
Agentic PR Review - Round 1Recommendation: Request ChangesWhat this PR doesThis PR adds three integration events to the CZ localization apps: The two new events in the table extension are correctly structured: they use the standard SuggestionsS1 - Adding a parameter to an existing event breaks subscribers S2 - No tests for new IsHandled bypass paths Risk assessment and necessityRisk: The signature change to Necessity: The extensibility goal (letting partners skip amount validation and override advance letter lookup/validate logic) is reasonable for a CZ localization app serving diverse partner scenarios. The new events for
|
…ed and tested correctly
Agentic PR Review - Round 2Recommendation: Accept with SuggestionsWhat this PR doesThis PR adds CZ Cash Desk and advance payment integration points. Since round 1, the amount FlowField calculation was moved inside the The default path is still the same: Status of previous suggestions
New observations (commits since round 1)None - the new commit only moves Risk assessment and necessityRisk: Default behavior remains unchanged when no subscriber sets the new flags. The risk is limited to extensions that opt in: a subscriber can skip standard advance letter validation or amount mandatory checks, so that subscriber must do its own validation before release or posting. I did not need BaseApp publisher verification because this PR adds publishers in BCApps and does not subscribe to BaseApp events. Necessity: The PR description gives a clear extensibility need for CZ advance payment and cash desk customizations. The scope is narrow and fits an event request. The remaining test gap is worth considering, but it does not block this low-risk extensibility change.
|
…ameters and improve event handling
…a new integration event
This comment was marked as duplicate.
This comment was marked as duplicate.
|
LookupAdvanceLetterNoCanBeHandled only verifies the IsHandled=true branch via CashDocLineTestHandlerCZZ. There is no companion test exercising "Advance Letter No. CZZ".Lookup() without the subscriber bound, to confirm the original (unhandled) lookup behavior/validation still works. Since the new early exit sits before the standard document/account checks, a regression in the unhandled path would go undetected. Add an unhandled-path lookup test alongside the handled-path test. Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.32.4 |
|
The PR adds OnBeforeCheckMandatoryFieldsSkipAmounts and a branch that skips both amount TestField checks during cash-document release, but none of the added tests exercise SkipAmountsTestFields = true or verify the default-false path still enforces the checks. Add targeted tests that (a) release a cash document with a subscriber setting the flag, and (b) confirm the amount checks still fail when the flag is not set. Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.32.4 |
Agentic PR Review - Round 3Recommendation: Accept with SuggestionsStatus of previous suggestions
Current suggestionsS3 - Add tests for amount-skip event What this PR doesThis PR adds CZ Cash Desk and advance payment integration events. Since round 2, the existing OnBeforeCheckMandatoryFields event was restored to its old signature, a new OnBeforeCheckMandatoryFieldsSkipAmounts event was added for the amount-skip scenario, xRec was removed from OnBeforeValidateAdvanceLetterNoCZZ, and tests were added for the validate and lookup handled paths. The public event surface is now additive: the existing event signature is no longer changed, and the new events are placed before the default validation or lookup logic they are meant to replace. The default behavior remains unchanged unless a subscriber sets a skip or handled flag. Risk assessment and necessityRisk: The main risk is opt-in extensibility in financial release and advance payment flows. A subscriber can skip standard amount checks or advance letter validation, so the subscriber must enforce its own business rules. I did not need BaseApp publisher verification because this PR adds publishers in BCApps and does not subscribe to BaseApp events. Necessity: The PR description gives a clear extensibility need for CZ advance payment and cash desk customizations. The scope is narrow and fits an event request. The remaining test gap is worth fixing, but it does not block this additive event work.
|
| end; | ||
|
|
||
| [Test] | ||
| [HandlerFunctions('YesConfirmHandler')] |
There was a problem hiding this comment.
The two new release tests use [HandlerFunctions('YesConfirmHandler')], but that shared handler always replies true and these scenarios never enqueue or verify the expected confirm text, nor assert that all expected UI interactions were consumed. An unexpected or duplicated confirm can therefore still leave the tests green, so the scenarios do not prove the right dialog fired.
Knowledge:
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.32.4
What & why
Added the OnBeforeValidateAdvanceLetterNoCZZ and OnBeforeLookupAdvanceLetterNoCZZ integration events. These events allow subscribers to override the default validation and lookup behavior of the Advance Letter No. CZZ field on cash document lines. Added the SkipAmountsTestFields parameter to the OnBeforeCheckMandatoryFields event.
To enable partners to customize selected parts of advance payment processing and better adapt the functionality to specific business requirements. Allows subscribers to skip mandatory validation of the cash document amount fields when needed.
Linked work
Fixes AB#640066
How I validated this
What I tested and the outcome
Tests Performed
Verified that validation of the Advance Letter No. CZZ field can be handled by an event subscriber before standard cash document line validation is executed.
Verified that the subscriber event is raised and the entered advance letter number is retained.
Verified that lookup of the Advance Letter No. CZZ field can be handled by an event subscriber before standard checks are executed.
Verified the lookup behavior on an otherwise invalid cash document line using the Cash Document Subform CZP page.
Verifies the default (unchanged) behavior: when a Cash Document line has a zero amount and no subscriber is bound, releasing the document still fails with the standard TestField error on Amount Including VAT.
ReleaseCashDocumentSkipsAmountsWithSubscriber
Verifies the new extensibility point: when a subscriber (Cash Doc. Release Handler CZP) sets SkipAmountsTestFields := true in the new event, the amount check is bypassed during release. Since the line still has an invalid (zero) amount, release then fails later for a different reason ("no lines to release"), confirming the amount check itself was actually skipped rather than the whole release logic being short-circuited.
Verified successful compilation of the test application.
Risk & compatibility