There was a bug till NAV 2018 CU 1 update that whenever a NAV 2018 extension is published from VS Code, all the data which was inserted earlier gets deleted.
1. Install Microsoft Dynamics NAV 2018 CU 2
2. Install VSIX Extension for VS Code
3. Open the launch.json file and enter schemaUpdateMode to synchronize
The data synchronization between each publish 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 the Synchronize mode, which means that every time you publish an extension to the development server, the data you entered previously stays. If you do not want to synchronize the sample data with each publish, 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. This means that you will get empty records when you publish your extension.
The post How to avoid data deletion when Dynamics NAV 2018 extension is published from VS Code appeared first on CloudFronts - Microsoft Dynamics 365 | Power BI | Azure.