Question 350
A Business Central developer must validate a correction for this condition: A developer assumes TryFunction means a failed set of database writes is always automatically rolled back in every context. Which acceptance result best demonstrates that the issue was resolved?
Explanation
Correct Answer
A controlled failure test demonstrates that no unauthorized partial business update persists. would provide case-specific evidence of a successful correction. Error handling semantics and transaction boundaries must be verified rather than guessed. The corresponding action is Design transactions and error recovery according to supported TryFunction behavior and avoid assuming implicit rollback.
Incorrect Answers
A successful test of that kind may follow perform authorization and business-state checks before mutating data. Here it would not prove the rule that error handling semantics and transaction boundaries must be verified rather than guessed.
The option would apply to “A codeunit iterates all sales lines just to locate records for one document number”. This result checks the customer-visible or technical outcome, rather than just compilation: Only the intended document lines are read or changed in the test fixture. This question instead requires “A controlled failure test demonstrates that no unauthorized partial business update persists”.
The related but distinct situation is “A program computes per-customer totals using an unbounded nested loop and slows as transaction history grows”. Therefore verify: A load test meets latency targets while preserving total accuracy. For the stated problem, “A controlled failure test demonstrates that no unauthorized partial business update persists” addresses the central condition.