You can import a FOB file, which contains Microsoft Dynamics NAV objects, into a database by using the development environment or the Import-NAVApplicationObjects cmdlet that is available in the Microsoft Dynamics NAV 2015 Development Shell.
When you import a FOB file that contains tables, you are prompted to choose a schema synchronization option to perform on tables after the import is finished. We recommend that you back up the application objects before importing the FOB file, and then choose the Now – with validationsynchronization option on the confirmation dialog box. You can back up the application objects by exporting all objects to a FOB file or making a full SQL backup of the database.
If you choose to synchronize the schema with validation, after the import is finished, the Microsoft Dynamics NAV Server compares the table definitions that were imported from the FOB file with the table definitions that are currently stored in the database.
- If Microsoft Dynamics NAV Server detects destructive changes to tables, then it will check whether there is an upgrade codeunit in the application that handles the destructive changes.
- If an upgrade codeunit is not found in the application, then an error occurs.
- If there is an upgrade codeunit to handle destructive table changes, then the changes are applied.
When you import objects in FOB files by using the Import-NAVApplicationObjects cmdlet, table schema synchronization is controlled by the SynchronizeSchemaChanges parameter of this cmdlet. By default, the SynchronizeSchemaChanges parameter is set to Yes. This means that during the import process, each table will be checked for destructive changes. If destructive changes are detected, the FOB file import will be canceled, even if an upgrade codeunit for handling the changes is included the FOB file. Therefore, if you want to import a FOB file that contains tables that have destructive changes and upgrade codeunits to handle the changes, you must set SynchronizeSchemaChanges parameter to No, and then call Sync-NAVTenant cmdlet that is available in the Microsoft Dynamics NAV 2015 Administration Shell to synchronize the changes. More…
See Also: Handling Destructive Changes With Tabke Schema Synchronization.