Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

"schemaUpdateMode": "Synchronize"...

Posted on by 768
Hi all,
I am working on AL i have created 1 table and one page when i publish the app more the one time on  same version the data that i entered was lost even i did not make any change in table or page.
Even i used  "schemaUpdateMode": "Synchronize" , i don't know why the data lost when the schemaUpdateMode = Synchronize.
any solution to safe the data ?

*This post is locked for comments

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: "schemaUpdateMode": "Synchronize"...

    No way for a single table.

    In a production environment, recreate is not possible, you need to always be backward compatible. In production you need to act as explained here:

    [View:https://demiliani.com/2018/10/26/dynamics-365-business-central-handling-breaking-schema-changes-on-production/]

  • yannstlo Profile Picture
    yannstlo 114 on at
    RE: "schemaUpdateMode": "Synchronize"...

    Hi,

    How about if I have 10 tables in my extension and only 1 is getting modified, do I have to loose the data in all the other tables? Is there a way to use the "schemaUpdateMode": "Recreate" on only 1 table?

    What about in a production environment, how would you handle modifications to your tables without loosing your data?

    Thanks

    Yann

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: "schemaUpdateMode": "Synchronize"...

    The data synchronization between each publish of an extension is controlled by schemaUpdateMode setting, which is specified in the launch.json. This setting consists of two options; Synchronize and Recreate. The default value for schemaUpdateMode is set to Synchronize mode, which means that every time you publish an extension the data you entered is preserved.

    If you don't want this, you can change the schemaUpdateMode setting from Synchronize to Recreate.

    When you 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.

  • RE: "schemaUpdateMode": "Synchronize"...

    sir how you use force in AL Extension V2.0 ?

  • ManishS Profile Picture
    ManishS 6,578 on at
    RE: "schemaUpdateMode": "Synchronize"...

    That's surprising.

    Had you used force to synchronize the changes.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans