Set the launch.json schemaUpdateMode to Recreate to clear table data automatically on every extension publish in a sandbox

MB-820 By islever Editorial Last updated

Install and configure a Business Central development environment

Short answer

D Set schemaUpdateMode to Recreate in launch.json so every publish recreates tables and clears their data in the sandbox.

Question

You are cleaning up sandbox environments for a company. The company requires data to be cleared from the environments each time an extension is published. You need to configure the launch.json file. Which schemaUpdateMode property should you set?
  1. ForceUpgrade
  2. ForceSync
  3. Synchronize
  4. Recreate Correct Answer

Key Takeaways

Recreate is the mode that wipes data on every publish; Synchronize and ForceSync keep existing data, and ForceUpgrade runs upgrade code but does not recreate tables. The requirement to clear data each publish points directly to Recreate.

The schemaUpdateMode setting in the AL launch.json file controls how the database schema is handled during publishing. Setting it to Recreate recreates all tables and table extensions on each publish, which removes all data in those tables.

Common mistake: Do not choose Synchronize, ForceSync, or ForceUpgrade when the goal is to lose all data on every publish, because those modes preserve data. Recreate is the only mode that recreates tables each time.

Expert Analysis

Why the Answer Is Correct

Option D is correct because schemaUpdateMode = Recreate recreates the tables and table extensions at every publish, so all data in those tables is cleared, meeting the cleanup requirement. This is the documented behavior of the Recreate mode in the launch.json configuration. Community voting is unanimously D (100 votes), and javieroto explains that Recreate recreates tables and loses their data on each publish.

Why the Other Options Are Wrong

Option A (ForceUpgrade) runs upgrade code and keeps data rather than clearing it. Option B (ForceSync) forces schema synchronization but preserves existing data. Option C (Synchronize) synchronizes the schema without recreating tables, so data remains intact.

Community Comment Notes

jp81 states 'Answer is D,' and javieroto explains that with Recreate, all tables and table extensions are recreated at every publish, meaning all data is lost.

Official Reference

Community Votes

D
100%

100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 3 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 3

  1. javieroto 👍 1 Answered D
    When we set the schema update mode to Recreate, all the tables and table extensions are recreated at every publish, which means that all the data in those tables are lost. This means that we will get empty records when we publish our extension every time we make some changes in the extension.
  2. leoizgon 👍 1 Answered D
    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-json-launch-file
  3. jp81 👍 5
    Answer is D

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

← Back to MB-820 Study Guide