Sync-NAVApp
Synchronizes a NAV App to the specified tenant's database.
Syntax
Sync-NAVApp
[-ServerInstance] <String>
-Name <String>
[-Publisher <String>]
[-Version <Version>]
[-Tenant <TenantId>]
[-TenantDatabaseId <TenantDatabaseId>]
[-Mode <NavAppSyncMode>]
[-ExclusiveAccessTicket <String>]
[-PassThru]
[-Force]
[<CommonParameters>]
Sync-NAVApp
[-ServerInstance] <String>
-Path <String>
[-Tenant <TenantId>]
[-TenantDatabaseId <TenantDatabaseId>]
[-Mode <NavAppSyncMode>]
[-ExclusiveAccessTicket <String>]
[-PassThru]
[-Force]
[<CommonParameters>]
Description
Use the Sync-NAVApp cmdlet to synchronize the schema changes from an app to a tenant database.
Examples
---------- EXAMPLE 1 ----------
Sync-NAVApp -ServerInstance DynamicsNAV -Id 'Test_Database' -Name 'Proseware SmartApp' -Publisher Proseware -Version 2.3.4.500 -Mode Add
This example synchronizes the NAV App 'Proseware SmartApp' to a tenant database with the ID 'Test_Database'.
---------- EXAMPLE 2 ----------
Sync-NAVApp -ServerInstance DynamicsNAV -Path '.\Proseware SmartApp.app' -Tenant 'Tenant1'
This example synchronizes the app at the specified path to the tenant database for the tenant with the ID 'Tenant1'.
---------- EXAMPLE 3 ----------
Sync-NAVApp -ServerInstance DynamicsNAV -Tenant 'Tenant1' -Name 'Proseware SmartApp' -ExclusiveAccessTicket $ticket
This example synchronizes the NAV app 'Proseware SmartApp' to the tenant database for the tenant with the ID 'Tenant1'. 'Tenant1' is in exclusive access mode and $ticket is the exclusive access ticket.
---------- EXAMPLE 4 ----------
Sync-NAVApp -ServerInstance DynamicsNAV -Tenant 'Tenant1' -Name 'Proseware SmartApp' -Mode Clean
This example uses the '-Mode' parameter to synchronize the tenant database for the tenant with the ID Tenant1 and remove the schema entities created by the NAV app 'Proseware SmartApp' (for example, tables and table extension related objects).
Parameters
-ExclusiveAccessTicket
Specifies the exclusive access ticket allowing this operation on the tenant in the exclusive access mode.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Force
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Mode
The sync mode that dictates the behavior of the command. Specifies how the database schema for the tenant database is synchronized with the database schema that the target NAV App's objects define.
Add: The database schema defined by the objects in the target NAV App are added to the database schema of the target tenant database. That is, if a table or table extension was included in the target NAV App, then the respective full or companion table is created in the tenant database.
Clean: The database schema defined by all versions of the target NAV App will be removed from the target tenant database and all data is lost. That is, if a table or table extension was included in any version of the target NAV App, then the respective full or companion table will be dropped from the tenant database.
Note
You cannot synchronize in clean mode if any version of the extension is installed on a tenant of the server instance. Moreover, in production, this should primarily be done as a final cleanup step after all versions of an extension have been uninstalled and unpublished for good.
Development: This mode is acts similar to Add
, except it is intended for use during development. It enables you to sync the same version of an App that is already published, eliminating the need to increase the version number. However, to run this mode, only one version the App can be currently published.
Type: | NavAppSyncMode |
Accepted values: | Add, Clean |
Position: | Named |
Default value: | Add |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Specifies the name of the NAV App that you want to synchronize. The results must uniquely identify a single NAV App.
Type: | String |
Aliases: | AppName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PassThru
Returns an Extension object for the synced Extension. The Extension object contains the properties of the Extension, such as name, publisher, version.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Path
Specifies the path to a NAV App package file that you want to synchronize. When using this parameter, the Tenant or TenantDatabaseId parameters must be specified.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Publisher
Specifies the publisher of the NAV App that you want to synchronize. The results must uniquely identify a single NAV App.
Type: | String |
Aliases: | AppPublisher |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ServerInstance
Specifies the Microsoft Dynamics NAV Server instance that the NAV App is published to, such as DynamicsNAV.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tenant
Specifies the ID of a specific tenant that you want to act on, such as Tenant1.
Type: | TenantId |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TenantDatabaseId
Specifies the ID of a specific tenant database that you want to act on, such as Data1.
Type: | TenantDatabaseId |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Version
Specifies the version of the NAV App that you want to synchronize. The results must uniquely identify a single NAV App.
Type: | Version |
Aliases: | AppVersion |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
System.String
By value and by property name: ServerInstance
System.String
By property name: Name
System.String
By property name: Publisher
System.Version
By property name: Version
System.String
By property name: Path
Microsoft.Dynamics.Nav.Types.TenantId
By property name: Tenant
Microsoft.Dynamics.Nav.Types.TenantDatabaseId
By property name: TenantDatabaseId
Microsoft.Dynamics.Nav.Types.NavAppSyncMode
By property name: Mode
System.String
By value and by property name: ExclusiveAccessTicket
Related Links
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for