5034

The Verifier That Kills Posting

Transactions
Medium
Pro
transaction-boundaries
validation

The Verifier That Kills Posting

For years the shipment verifier ran behind a card-page action, one request at a time, and nobody ever complained. Last week it was wired into the posting pipeline as a pre-posting check — and posting started dying the moment a shipment was verified. Perfectly valid requests kill the run too, and the error is not one of the verifier's own guard messages. The pipeline is strict about one thing: a posting run is a single atomic transaction, and the platform enforces it — inside the pipeline's scope, any attempt to end that transaction before the run finishes is stopped with a runtime error. The verifier's checks haven't changed; something about being a guest in someone else's transaction has. Diagnose why the verifier cannot survive in that scope, then make VerifyRequest behave identically for every caller — without changing what it verifies.

The objects you get

The starter ships four objects. Do not rename them or their fields — the grading tests bind to every name below character for character. The three data objects are finished; the codeunit is the one you fix.

  • Table "Shipment Request" — primary key "No." (Code[20]); fields "Customer No." (Code[20]), Quantity (Decimal), Status (enum "Shipment Request Status", defaults to Open).
  • Table "Verification Log Entry" — primary key "Entry No." (Integer); fields "Request No." (Code[20]), Passed (Boolean), Message (Text[250]).
  • Enum "Shipment Request Status" — values Open, Verified.
  • Codeunit "Shipment Verifier" — the legacy implementation of the routine under test.

Requirements

Keep the signature exactly as shipped:

procedure VerifyRequest(RequestNo: Code[20])
The rest of the statement and 3 hints Unlock with Pro
ALBusiness Central 28.5
Pro
Pro problem

Solve it with Pro

You’re reading the opening of the statement. Pro unlocks the whole problem:

  • The full statement
  • Starter code in the browser editor
  • 10 grading tests, run on Business Central 28.5
  • 3 hints
  • The reference solution

Pro also opens all 92 Pro problems and lifts the daily limits on compile checks and submissions.

$10 / month
or $100 / year
Upgrade
This problem is part of Pro
Pro unlocks the full statement, tests, hints and solution. The code editor works on a computer.
Upgrade