Question 230
At fictional Quayside Events, the Business Central development team is supporting event vendor payments and reviewing object model and application extensibility during a tenant acceptance test (MB820-3.4-092). The observed development issue is that two independent calculation engines should be selectable by configured policy without hard-coding their implementations. Which Business Central or AL development principle best explains the right response?
Explanation
Correct Answer
The governing principle is that interfaces separate caller expectations from interchangeable implementations. The engineering response is to define an AL interface and implement it in separate codeunits with a supported dispatch pattern. Verification should show that both implementations satisfy the same contract and can be chosen without caller source rewrites.
Incorrect Answers
“Transaction control must respect business process atomicity” supports the separate task “review transaction boundaries and remove unintended commits from reusable business logic”, not the reported problem: two independent calculation engines should be selectable by configured policy without hard-coding their implementations. This case instead calls for “define an AL interface and implement it in separate codeunits with a supported dispatch pattern”.
“Business events decouple cross-cutting logic from one screen” concerns the alternative task “subscribe to an appropriate published business event or design a reusable codeunit validation at the relevant process boundary”, but the stated failure is that two independent calculation engines should be selectable by configured policy without hard-coding their implementations. The required measure is to define an AL interface and implement it in separate codeunits with a supported dispatch pattern.
The proposed “App installation and data upgrade are different lifecycle events” tests a different control: use distinct Install and Upgrade codeunits, implementing the appropriate lifecycle triggers. The reported condition is that two independent calculation engines should be selectable by configured policy without hard-coding their implementations; the more direct action is to define an AL interface and implement it in separate codeunits with a supported dispatch pattern.