Question 390
A fiscal app requires a default setup row the first time it is installed for a customer. The developer recommends the following change: Use an install codeunit and guard setup initialization for first installation. Which technical explanation most directly justifies it in this case?
Explanation
Correct Answer
An install codeunit performs initial tenant setup; repeated deployment must not reinitialize established user data. It connects the proposed action to the exact failure or requirement—A fiscal app requires a default setup row the first time it is installed for a customer. Confirmation would be a fresh install creates defaults while an upgrade leaves existing configured values untouched.
Incorrect Answers
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; an install codeunit performs initial tenant setup; repeated deployment must not reinitialize established user data. The distinguishing requirement is: A fiscal app requires a default setup row the first time it is installed for a customer.
That mechanism explains why the alternative action—extract the shared business logic into a codeunit with reusable procedures—helps in another case. It does not justify the proposed fix here; an install codeunit performs initial tenant setup; repeated deployment must not reinitialize established user data. The distinguishing requirement is: A fiscal app requires a default setup row the first time it is installed for a customer.
That mechanism explains why the alternative action—subscribe an al event handler to the appropriate published event—helps in another case. It does not justify the proposed fix here; an install codeunit performs initial tenant setup; repeated deployment must not reinitialize established user data. The distinguishing requirement is: A fiscal app requires a default setup row the first time it is installed for a customer.





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