Synchronizing Table Schemas When Importing FOB Files

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.


Importing objects in a multi tenancy environment

The following posting is based on a support request where a partner wanted specific instructions what the process should be when trying to import a FOB file in a true multi tenant environment. If you simply import the FOB file. More…

Note: NAV Multitenant sync.

Waldo Blog: NAV 2013 R2 Multi Tenancy: Force Full Sync on All Tenants.

Export and Import Dynamics NAV objects in NAV 2013 and 2013 R2 with the new NAV 2015 PowerShell Commandlets