Condividi tramite


Using the Development Environment from the Command Prompt

You can start the Microsoft Dynamics NAV Development Environment by running finsql.exe at the command prompt. You can also use the finsql.exe command to perform the following development tasks without using the development environment:

  • Create databases

  • Upgrade databases

  • Compile objects

  • Delete objects

  • Export objects

  • Import objects

  • Export language modules

  • Import language modules

  • Export text strings for translation

  • Import translated text strings

  • Build metadata for application objects.

  • Set the object cache.

  • Set the temporary file location.

  • Enable Unicode for the development environment

  • Set the path and file name of the ZUP file for storing setup parameters.

  • Get the Dynamics NAV build version.

    By default, finsql.exe is located at C:\Program Files (x86)\Microsoft Dynamics NAV\100\RoleTailored Client\.

Finsql.exe Command Syntax

The finsql.exe has the following syntax.

Finsql.exe [command=<command> | designobject=<object type> <object ID>,] [servername=<server>,] [database=<database>,] [collation=<collation>,] [file=<file>,] [filter=<filter>], [importaction=<default|overwrite|skip|0|1|2>,] [langid=<ID>,] [logfile=<logfile>,] [navservername=<name>,] [navserverinstance=<instance>,] [navservermanagementport=<port>,] [ntauthentication=<yes|no|0|1>,] [objectcache=<cache>,] [password=<password>,] [temppath=<path>,] [tenant=<tenant ID>,] [username=<user name>,] [synchronizeschemachanges=<yes|no|force>, ] [useoldeditor=<yes|no>,] [showalldesignercolumns=<yes|no|0|1>,] [suppresselevationcheck=<yes|no|0|1>]  

Syntax Key

The following table describes the notation that is used to indicate syntax.

Notation Description
Text without brackets Parameters that you must type as shown.
<> A placeholder for values that you must supply. Do not include the brackets in the value.
[ ] Optional parameters. Do not include the brackets.
| A set of values from which to choose. Use one of the options and do not include &#124; in the value.

Information about building commands

  • The parameters that you use will depend on the command that you are running as determined by the command and designobjects parameters.

  • You can place parameters in any order after finsql.exe.

Finsql.exe Parameters

The following table describes the parameters that you can use with finsql.exe.

Parameter Description Related command
collation The collation to use when you create a new database. The value must be one of the following:

* A full language culture name. For example, da-DK for Danish or hu-HU for Hungarian.

* A SQL Server collation name without case or accent. For example, Latin1_General_100.

* A SQL Server collation name with case and accent. For example, Danish_Greenlandic_100_CS_AI.

Use this optional parameter when you create a database with the command=createdatabase parameter.
CreateDatabase
command The development command that you want to run. The possible values are as follows:

* BuildVirtualMetadata

* CreateDatabase

* UpgradeDatabase

* CompileObjects

* DeleteObjects

* ExportObjects

* ImportObjects

* ExportLangModule

* ImportLangModule

* ExportTranslate

* ImportTranslate

* ExportToNewSyntax

* GetBuildVersion

If you specify this parameter and run a command, then the development environment does not open.
Not applicable
database If you use the command=CreateDatabase parameter, then the database parameter specifies the name of the new database that you want to create. In this case, the database parameter is required.

For all other commands, the database parameter specifies the database that you want to open.

If you do not specify both the servername and the database parameter, then the database server and database that are stored in the .zup file are used. If you do not specify the database parameter but you do specify the servername parameter, then the Open Database window opens so that you can specify the database name.

For more information, see Saving Setup Parameters in the Zup File.
All
designobject The type and ID of the object that you want to design. The possible values of the object type are as follows:

* Table

* Page

* Report

* Codeunit

* Query

* XMLport

The possible values of the object ID are 0 and any ID of an existing object. If you specify 0 for the object ID, then you open a new object to design.

For more information, see DesignObject.
Not applicable
file The path and file name of the file that is used for exporting data to or importing data from. The file type depends on the command. CreateDatabase

ExportObjects

ImportObjects

ExportLangModule

ImportLangModule

ExportTranslate

ImportTranslate
filter A filter on the Object table.

Use this parameter to specify which objects the command applies to.
CompileObjects

CreateLanguage

ExportObjects

ExportTranslate
id Specifies the path and file name of the .zup file for storing setup parameters. By default, the setup parameters are stored in and retrieved from the fin.zup file. If you specify the id parameter, then the setup parameters are stored in and retrieved from a file that is named <id>.zup.

By default, the fin.zup file is located at C:\users\<user name>\AppData\Roaming\. To change the location of the .zup file, specify the path and ID in the id parameter.

For example, the following command sets the path and file name of the .zup file to C:\mynavfin.zup:

finsql.exe id="C:\mynavfin.zup"

For more information, see Saving Setup Parameters in the Zup File.
None. You use this as a stand-alone parameter with the finslg.exe.
importaction Specifies how to handle conflicts with existing objects when you import from a .fob file. The possible values are:

* default or 0 (default) – If there is a conflict, then an error is logged in the log file and no objects from the file are imported.

* overwrite or 1 – If there is a conflict, then overwrite the existing object with the object in the import file.

* skip or 2 - If there is a conflict, then skip the object. The existing object remains unchanged.
ImportObjects
langid Specifies the standard Windows three-letter ID of the language. CreateLanguage

ExportLangModule
logfile Specifies the path and file name for the file that contains error messages that result from running finsql.exe with the command parameter. If there are no errors, then a log file is not created. All
navservername Specifies the name of the server that hosts the Microsoft Dynamics NAV Server instance, such as MyServer. CompileObjects

DeleteObjects

ImportObjects
navserverinstance Specifies the Microsoft Dynamics NAV Server instance that is being used, such as DynamicsNAV110. CompileObjects

DeleteObjects

ImportObjects
navservermanagementport Specifies the port on the Microsoft Dynamics NAV Server that the Dynamics NAV Windows PowerShell cmdlets access, such as 7045. CompileObjects

DeleteObjects

ImportObjects
ntauthentication Specifies if you want to use NT authentication. The possible values are yes, no, 1, or 0. If you specify the username and password parameters, then you must specify ntauthentication=no or ntauthentication=0. All
objectcache Specifies the size of the object cache, in kilobytes. Objects such as code, descriptions, and windows that are used on the computer that is running the development environment are stored in the object cache.

The default value is 32000.

For example, the following command sets the object cache to 50000:

finsql.exe objectcache=50000

You can also set the object cache from the Options window in the Tools menu of the development environment. For more information, see Options,
None. You use this as a stand-alone parameter with the finsql.exe.
password Specifies the password to use with the username parameter to authenticate to the database. If you do not specify a user name and password, then the command uses the Windows user name and password of the current user to authenticate to the database. All
servername Specifies the name of the database server.

If you do not specify both the servername parameter and the database parameter, then the database server and database that are stored in the .zup file are used. If you do not specify the servername parameter but you do specify the database parameter, then the Open Database window opens so that you can specify the database server name.

For more information, see Saving Setup Parameters in the Zup File.
All
synchronizeschemachanges Synchronizes table schema changes for all tables in the database. This is useful when you upgrade from an earlier version of Dynamics NAV or when you made changes to a table or multiple tables previously and chose to synchronize later. For more information, see Synchronizing Table Schemas. All
temppath Specifies the path of the location to store temporary files that are created while Dynamics NAV runs. These files are automatically deleted when Dynamics NAV is closed.

By default, these files are put in the Temp folder for the user, such as <C:\Users\<user name>\AppData\Local\Temp>.

For example, the following command sets the temporary file path to C:\Temp:

finsql.exe temppath="c:\temp"

You can also set the temporary file path from the Options window in the Tools menu of the development environment. For more information, see Options,
None. You use this as a stand-alone parameter with the finsql.exe.
tenant Specifies the ID of the tenant that is accessed when you run objects from the development environment. If your solution is not set up to deploy in a multitenant deployment architecture, leave the parameter empty. CompileObjects

DeleteObjects

ImportObjects
unicode Specifies if you want to open the development environment with Unicode enabled.

Add the unicode=1 parameter to finsql.exe if your application objects contain strings such as €, and you want to be able to compile and use the objects on computers with different codepages.
None. This parameter is not relevant when you use command because the development environment does not open.
useoldeditor Specifies whether to use the C/AL Editor that was available in Microsoft Dynamics NAV 2015 and earlier versions. The C/AL Editor was redesigned in Microsoft Dynamics NAV 2016.

To use the old editor, specify the parameter as useoldeditor=yes or useoldeditor.

To use the new editor, omit the parameter or specify it as useoldeditor=no.
None. This parameter is not relevant when you use command because the development environment does not open.
username The user name to use to authenticate to the database. The user name must exist in the database. If you do not specify a user name and password, then the command uses the Windows user name and password of the current user to authenticate to the database.

Alert: If User Access Control (UAC) is turned on and you do not specify to run the Command Prompt window as Administrator, then the Command Prompt window runs as a standard user. In this case, if you do not specify the username parameter and the current Windows user is an Administrator, then the command is run as the standard user.

If you specify the username parameter, then you must also specify the password parameter and the ntauthentication parameter must be no or 0.

For more information about database users and permissions, see Setting Database Owner and Security Administration Permissions.
All
showalldesignercolumns Specifies whether to hide or show the Visible and ApplicationArea columns in Page Designer. The possible values are: no, 0, yes, and 1.

no or 0 - Hides the columns. This is the default setting.

yes or 1 - Shows the column.

Note This parameter is only relevant the very first time the development environment is opened for a new installation. If the development environment has been opened before, this parameter is ignored, and the column setup parameters are retrieved from the fin.zup file that is used by the development environment. By default, the fin.zup file is located in the C:\Users[username]\AppData\Roaming folder.
All
suppresselevationcheck Specifies whether to check that finsql.exe is running in elevated mode (as an administrator) and if not, give a warning that proceeding might cause errors. You are given the option to continue or cancel. The possible values are: no, 0, yes, and 1.

no or 0 run the check. This is the default setting.

yes or 1 suppress the check.
UpgradeDatabase

Database conversion

See Also

Development Environment Commands
Saving Setup Parameters in the Zup File
Designing Application Objects