New-NAVAddIn

Registers an add-in the system table 2000000069 Add-ins of the Business Central database.

Syntax

New-NAVAddIn
   -AddInName <String>
   [-Version <String>]
   -PublicKeyToken <String>
   [-Category <AddInCategory>]
   [-Description <String>]
   [-Resource <Byte[]>]
   [-ServerInstance] <String>
   [-Force]
   [-ProgressAction <ActionPreference>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-NAVAddIn
   -AddInName <String>
   [-Version <String>]
   -PublicKeyToken <String>
   [-Category <AddInCategory>]
   [-Description <String>]
   [-ResourceFile <String>]
   [-ServerInstance] <String>
   [-Force]
   [-ProgressAction <ActionPreference>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Add-ins must be registered in table 2000000069 Add-ins before they can be used in a Business Central client or on the Business Central Server instance. The New-NAVAddin cmdlet creates an entry for the add-in in the table.

An add-in typically consists of one or more .NET Framework assemblies and support files. These files must be installed either on the computer running the Business Central Server or client. Instead of manually installing the add-in files, you can use the -ResourceFile parameter of the cmdlet to set up the system to automatically deploy the add-in the first time that it is requested. To do this, before you run the New-NAVAddin cmdlet, create a compressed (.zip type) file that contains the files (in the desired folder structure) that are associated with the add-in.

For an add-in to be deployed automatically, it must have the same name as the assembly that contains it.

Examples

EXAMPLE 1

New-NAVAddIn -ServerInstance BC -Category dotnetcontroladdin -PublicKeyToken 31bf3856ad364e35 -ResourceFile 'c:\addins\MyNavAddin.zip'

This example registers an add-in of the DotNet Control Add-in category in the system table 2000000069 Add-ins. The example also uploads the add-in files that are contained in the MyNavAddin.zip file that is located in the folder path c:\addin.

Parameters

-AddInName

Specifies the name of the add-in.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Category

Specifies the category of the add-in. There are four categories that you can specify: DotNet Control Add-in, DotNet Interoperability, Javascript Control Add-in, and Language Resource.

Type:AddInCategory
Accepted values:JavaScriptControlAddIn, DotNetControlAddIn, DotNetInteroperability, LanguageResource
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before executing the command.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Specifies a description of the add-in for identification purposes.

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:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ProgressAction

A common PowerShell parameter that determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider. Learn more.

Type:ActionPreference
Aliases:proga
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PublicKeyToken

Specifies a public token key of the add-in. The public key token is a 16-character key that is given to the add-in assembly when it is built and signed in Microsoft Visual Studio.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Resource

Specifies a resource file for the add-in. the resource file can be used to stream the add-in to the Business Central Server instance.

Type:Byte[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ResourceFile

Specifies the full path to a compressed file (.zip type) that contains the add-in assembly and associated files.The full path includes the drive, folders and file name. Use this parameter to set up the automatic deployment of the add-in files to Business Central Server instances instead of manually deploying the files.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ServerInstance

Specifies the name of a Business Central Server instance, for example, BC or myinstance. You can specify either the full name of an instance, such as MicrosoftDynamicsNavServer$myinstance or the short name such as myinstance.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Version

Specifies a version number for the add-in. The version number must have the format N.N.N.N, such as 8.0.0.0. This version number must match the version number that is assigned to the assembly.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False