The Compile-NAVApplicationObject function compiles application objects in the specified database.
A filter can be specified to select the application objects to be compiled.
Unless the Recompile switch is used only uncompiled objects are compiled.
Examples
EXAMPLE 1
Compile-NAVApplicationObject MyApp
Compiles all uncompiled application objects in the MyApp database.
Compiles all uncompiled Pages, Codeunits, Tables, XMLports, Reports and Queries in the MyApp database in parallel and wait until it is done.
Note that some objects may remain uncompiled due to race conditions.
Those remaining objects can be compiled in a seperate command.
Parameters
-AsJob
Compiles in the background returning an object that represents the background job.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DatabaseName
Specifies the name of the Business Central database.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
1
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DatabaseServer
Specifies the name of the SQL server instance to which the Business Central database is attached.
The default value is the default instance on the local host (.).
Parameter properties
Type:
String
Default value:
.
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Filter
Specifies the filter that selects the objects to compile.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-GenerateSymbolReference
Specifies that symbols should be generated for application objects as part of compilation. Generating symbols is used when developing by using both C/SIDE and AL. It ensures that changes to objects in C/SIDE are reflected in the symbol download of the the AL Language extension in Visual Studio Code. For more information, see Running C/SIDE and AL Side-by-Side.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-LogPath
Specifies the log folder.
Parameter properties
Type:
String
Default value:
"$Env:TEMP\NavIde\$([GUID]::NewGuid().GUID)"
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-NavServerInstance
Specifies the Business Central Server instance that is being used.The default value is DynamicsNAV90.
Parameter properties
Type:
String
Default value:
DynamicsNAV90
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-NavServerManagementPort
Specifies the port on the Business Central Server server that the Business Central Windows PowerShell cmdlets access.
The default value is 7045.
Parameter properties
Type:
Int16
Default value:
7045
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-NavServerName
Specifies the name of the server that hosts the Business Central Server instance, such as MyServer.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Password
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 credentials of the current Windows user to authenticate to the database.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
DatabaseAuthentication
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Recompile
Compiles objects that are already compiled.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-SynchronizeSchemaChanges
Specifies the schema synchronization behaviour.
The default value is 'Yes'.
Parameter properties
Type:
String
Default value:
Yes
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-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 credentials of the current Windows user to authenticate to the database.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
DatabaseAuthentication
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.