Code:
if (isConfigurationKeyEnabled (configurationkeynum(keyname)))
{
// Code goes here..
}
else
{
// do something else
}
Happing daxing
else
{
// do something else
}
Happing daxing
Command : Publish-AXReport -ReportName CustTransList
To deploy two or more specific reports, enter the names of the reports. For example, to deploy the CustTransList and CustTransOpenPerDate reports, enter the following command:
Command : Publish-AXReport -ReportName CustTransList, CustTransOpenPerDateDeploy All Report
To deploy all reports, enter the following command:
Command : Publish-AXReport –ReportName
![]() |
---|
You should stop the AOS service before you start AxBuild.exe. Otherwise in certain scenarios, the AxBuild.exe service might provide outdated metadata or outdated p-code to the compile process.
|
File name
|
Description
|
---|---|
AxCompileAll.html
|
Contains the final list of compile errors in XML format.
You can import the file into the MorphX development environment by following these steps:
After the log file is imported, you can examine and fix each compile error just as if the errors had been logged by the compiler on the client tier.
|
AOTCompile.log
|
Contains information that partly duplicates the information that is written to the console.
|
Name
|
Alias
|
Required?
|
Description
|
---|---|---|---|
xppcompileall
|
No short alias.
|
Required.
|
Tells the program do a full compile on all X++ code, which creates all new p-code to be stored in the model store database.
This parameter name has no accompanying value, and no leading '/'.
This parameter is a command to tell the program the type of action to perform. So far it is the only command parameter.
|
/altbin
|
/a
|
Optional.
|
Path to the folder on the local AOS host computer that has the DLL files which are installed with an ax32.exe client.AxBuild.exe verifies that ax32.exe is in the directory before it proceeds with the compile action.
A good path to use might be the path that the client install would typically create. You must confirm the exact correct path for your particular environment:
C:\Program Files(x86)\Microsoft Dynamics AX\6.0\Client\Bin\
One way to create and populate such a directory path is to install the client onto the AOS host computer, even though maybe no person would use the client on that host.
Thereafter, any developers who add a third party DLL to their own client directory must ensure that the DLL is manually copied to this corresponding directory on each AOS where this program might be run.
If the ax32.exe client is not installed onto the AOS host computer, this manually created directory must be initially populated manually with all the DLL files from a client installation on another computer.
If you omit this parameter, AxBuild.exe examines the Microsoft Dynamics AX client configuration information in the Windows Registry in an attempt to find the correct path.
|
/aos
|
/s
|
Often optional.
|
Instance number of an AOS that is installed on the same computer where this program runs.
If you omit this parameter, AxBuild.exe examines the Microsoft Dynamics AX server configuration information in the Windows Registry. If the Registry contains information about exactly one AOS instance, that information is used as the default value for this parameter.
The temporary instances of the AOS all use the same configuration specifications that this AOS instance number uses.
To see a list of all available instance numbers, run the Microsoft Dynamics AX Server Configuration Utility,AxSrvCfg.exe. At the top of its window is a drop-down list that is labeled Application Object Server Instance. Perhaps the most commonly used value is 01, as in /aos=01.
The parameters /dbserver and /modelstore are available in case you need to override those parts of the AOS instance configuration information.
|
/compiler
|
/c
|
Sometimes required.
This /c parameter might be absent from the report that is generated by the /help parameter, but /c is fully supported.
|
You need this parameter only when the current directory is not the directory where ax32serv.exe resides. In this case the value of the parameter must be the name ax32serv.exepreceded by its directory path. A realistic example might be the following value:
/compiler="C:\Program Files\Microsoft Dynamics AX\6.0\Server\bin\ax32serv.exe"
Full compiles that are started by automation might be relatively likely to need this parameter.
|
/dbserver
|
/d
|
Optional.
|
The name of the Microsoft SQL Server instance that manages the AX model store database.
Typically this parameter is not used. Instead the program is allowed to obtain this information from the configuration it obtains from the AOS instance that is referenced by the /aos parameter.
|
/help
|
/h or /?
|
Optional.
|
Writes brief descriptions about all parameters to the stdout handle of the console.
This parameter name has no accompanying value.
This parameter is implied if no parameters are supplied.
If there are any discrepancies between this topic and the /help output, this topic is correct.
|
/log
|
/l
|
Optional.
|
Specifies the directory path to which the two log files are written.
The default path is the Server\...\Log\ directory under the installation location of the AOS. More exactly, the default value is stored in the Registry at the following location:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\ Dynamics Server\6.0\01\Original (installed configuration) , in logdir.
The /log parameter does not specify the name of a file. It specifies a path.
The /verbose parameter affects how much information is written to this log file.
|
/modelstore
|
/m
|
Optional.
|
Name of the model store database.
Typically this parameter is not used. Instead the program is allowed to use the value it obtains from the configuration as directed by the /aos parameter.
|
/nocleanup
|
/n
|
Optional.
|
Tells the program to keep the temporary files it writes under the %TEMP% directory.
This parameter name has no accompanying value.
Without this parameter, the default behavior is for the program to delete the temporary files immediately before it ends its run.
|
/verbose
|
/v
|
Optional.
|
Tells the program to write all the tracing and diagnostic information that it has to stdout, and to the AOTComp.log file. Without this parameter, less information is written.
This parameter name has no accompanying value.
Usually the program writes only the subset of information that a person typically might want to watch scroll by on the screen in the cmd.exe window.
|
/workers
|
/w
|
Optional.
|
Number of parallel or concurrent AOS workers for the compilation and build processes.
The program calculates a sensible integer value based on the number of available processor cores. But you might want to fine tune this value. A rough approximation might be 1.4 workers per core.
|
Outcome
|
Explanation
|
Code example
|
---|---|---|
Example that Fails
|
This X++ code example syntactically chains themethod2 call to the end of themethod1 call. The server compiler reports an error for the method2 call.
Underlying Details: Often COM objects that are called by X++ code are installed only on the client tier, and are not installed on the server tier. In the preceding code example, the underlying problem is that the server compiler cannot know the return type from method1. Its return type could be another COM object or just an integer. If the return type from method1were an integer, the chained call to method2 would certainly be invalid. The compiler issues an error because it cannot prove that method1 returns another COM object.
| void methodXpp() { COM comInstanceA = new COM("MyCOMType_A"); comInstanceA.method1().method2(); } |
Example thatSucceeds
|
This X++ code example eliminates the chain, and succeeds.
Underlying Details: In the preceding code example, the server compiler is told by an explicit type declaration that variable comInstanceB is a COM object. This gives the compiler justification to insert a call to the dispatch method for method2.
| void methodXpp() { COM comInstanceA = new COM("MyCOMType_A"); COM comInstanceB; comInstanceB = comInstanceA.method1(); comInstanceB.method2(); } |
Menu path
|
Description
|
---|---|
Save button on the X++ code editor
|
Incremental compile of the X++ source code that is in the editor pane. The compile is to AX p-code.
However, no compile occurs if the source code has not changed after it was most recently compiled.
|
AOT > Classes > YourClass > YourMethod. Right-click YourMethod, and then clickCompile.
|
Incremental compile of the targeted X++ source code to AX p-code.
The compile does occur even if the code has not changed after it was most recently compiled.
|
Menu Build > Compile, or press F7.
|
Full compile of X++ to AX p-code.
The full compile occurs regardless of whether the X++ source code has changed after it was most recently compiled.
This is the client option that is most similar to AxBuild.exe.
|
Right-click AOT, and then click Compile.
|
Same as menu Build > Compile.
|
Right-click AOT, and then click Add-Ins, and finally click either of the following:
|
The CIL generation takes as input the AX p-code, not any X++ source code.
These CIL generations occur even if the p-code has not changed after the p-code was most recently compiled from X++.
|