Question 370
A partner needs to react when standard sales posting completes without directly rewriting the posting routine. The developer recommends the following change: Subscribe an AL event handler to the appropriate published event. Which technical explanation most directly justifies it in this case?
Explanation
Correct Answer
Event subscribers add behavior at published integration points while keeping the standard publisher code intact. It connects the proposed action to the exact failure or requirement—A partner needs to react when standard sales posting completes without directly rewriting the posting routine. Confirmation would be a sample standard transaction triggers the subscriber once with correct event parameters.
Incorrect Answers
That mechanism explains why the alternative action—define an al interface and implement it in the provider codeunits—helps in another case. It does not justify the proposed fix here; event subscribers add behavior at published integration points while keeping the standard publisher code intact. The distinguishing requirement is: A partner needs to react when standard sales posting completes without directly rewriting the posting routine.
That mechanism explains why the alternative action—use an install codeunit and guard setup initialization for first installation—helps in another case. It does not justify the proposed fix here; event subscribers add behavior at published integration points while keeping the standard publisher code intact. The distinguishing requirement is: A partner needs to react when standard sales posting completes without directly rewriting the posting routine.
That mechanism explains why the alternative action—implement a controlled upgrade codeunit to migrate records during extension upgrade—helps in another case. It does not justify the proposed fix here; event subscribers add behavior at published integration points while keeping the standard publisher code intact. The distinguishing requirement is: A partner needs to react when standard sales posting completes without directly rewriting the posting routine.





Microsoft Dynamics 365 Business Central Developer (MB-820) Practice Tests