
Hope you all started app development and may be wondering how to retain data after publishing app or debugging several times or after adding more sample data.
How do I retain the sample data so every time no need to add the same data. ?????
In Business central you can synchronize the sample data while publishing several times. This can be done by simple settings in launch .json file.

Once you mention this settings then the data synchronize is controlled by this settings.
This settings consist of two options i.e. Synchronize and Recreate .
The default value is synchronize which means data will be retain every time when the app get published.
When schemaupdate set to Recreate mode then all the tables and table extensions are recreated every time and data will get lost.
When schemaupdate set to Synchronize then:
Do’s
- Add more field in table
- Increase length of field.
Don’t
- Don’t delete the field which contains sample data as if the field is removed from table then data can not be synchronize
- Don’t decrease the length of field for code and text datatype.
For above points you need to write upgrade code units or set schemaupdate to recreate.
In next blog will see how to write upgrade code units.
Stay tuned for more…
Like this:
Like Loading...
Related
Author: Ammolh Saallvi
I'm a Dynamics NAV/Navision developer and helps partners and end-users with their NAV implementations. I do everything from third-party management advisory, training to new NAV teams, project management, training, setup and development.
Do you want to hire me to help getting your project a success? Then contact me via dropping one email from linkedin
Expertise in end-to-end development of software products from requirement analysis to System Study, Documentation and Testing. Demonstrated abilities in analyzing information system needs, evaluating end-user requirements, custom designing solutions, troubleshooting for complex information systems management. Deft at carrying out risk analysis, impact analysis, project reviews and documentation. Strong Problem solving & Technical skills coupled with confident decision making for enabling effective solutions leading to high customer satisfaction as well as low operational costs.
Certifications:-
Microsoft Certified Technology Specialist -Dynamics
Microsoft Sure Step Certified Professional
Moderator at DUG Forum
Specialties: • ERP Implementation
• Client/Server Programming
• Coding, Testing, troubleshooting and documentation.
• Database Tuning and SQL
• Database Performance
• Debugging large programs
• Project Management and Resource Management.
View all posts by Ammolh Saallvi
One thought on “How to Retain data after publishing App”