Question 740
At fictional Foxglove Medical, the Business Central development team is supporting regulated item distribution and reviewing object model and application extensibility during an extension maintenance sprint (MB820-3.4-094). The observed development issue is that a subscriber assumes a publisher event always includes a posted document record that is actually optional. Which Business Central or AL development principle best explains the right response?
Explanation
Correct Answer
The governing principle is that event subscribers must respect publisher data and signature semantics. The engineering response is to inspect the event signature and handle missing or incomplete values according to contract. Verification should show that the extension does not crash on supported event variants.
Incorrect Answers
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 a subscriber assumes a publisher event always includes a posted document record that is actually optional; the more direct action is to inspect the event signature and handle missing or incomplete values according to contract.
“Publisher-subscriber extensibility helps maintain compatibility” supports the separate task “use available integration events and a subscriber or suitable extension point”, not the reported problem: a subscriber assumes a publisher event always includes a posted document record that is actually optional. This case instead calls for “inspect the event signature and handle missing or incomplete values according to contract”.
“Error handling should protect data correctness, not merely user experience” concerns the separate step “preserve error meaning and stop or compensate the transaction rather than falsely reporting success”. The reported issue is that a subscriber assumes a publisher event always includes a posted document record that is actually optional, so the direct response is to inspect the event signature and handle missing or incomplete values according to contract.