Question 150
At fictional Brookstone Labs, the Business Central development team is supporting research procurement and reviewing object model and application extensibility during an extension maintenance sprint (MB820-3.4-098). The observed development issue is that an extension copies a vendor codeunit to change one hook and then misses future bug fixes. Which Business Central or AL development principle best explains the right response?
Explanation
Correct Answer
The governing principle is that publisher-subscriber extensibility helps maintain compatibility. The engineering response is to use available integration events and a subscriber or suitable extension point. Verification should show that the custom behavior runs after updates without maintaining a duplicate core codeunit.
Incorrect Answers
“Codeunits encapsulate reusable AL behavior” supports the separate task “move reusable logic to an appropriate codeunit and call it through a stable interface”, not the reported problem: an extension copies a vendor codeunit to change one hook and then misses future bug fixes. This case instead calls for “use available integration events and a subscriber or suitable extension point”.
“Transaction control must respect business process atomicity” concerns the separate step “review transaction boundaries and remove unintended commits from reusable business logic”. The reported issue is that an extension copies a vendor codeunit to change one hook and then misses future bug fixes, so the direct response is to use available integration events and a subscriber or suitable extension point.
“App installation and data upgrade are different lifecycle events” concerns the alternative task “use distinct Install and Upgrade codeunits, implementing the appropriate lifecycle triggers”, but the stated failure is that an extension copies a vendor codeunit to change one hook and then misses future bug fixes. The required measure is to use available integration events and a subscriber or suitable extension point.