SysAutoRun Class [AX 2012]
The SysAutoRun class enables the system administrators to configure Microsoft Dynamics AX by supplying the Microsoft Dynamics AX client by using an XML file that contains the configuration commands.
Syntax
class SysAutoRun
Run On
Client
Methods
Method | Description | |
---|---|---|
cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) | |
equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) | |
execAdjustGlobalTypes | Allows modification of properties on global data types in Microsoft Dynamics AX. | |
execBulkCopyDataUpgrade | Performs synchronization after a data upgrade. | |
execBulkCopyMap | Runs the data upgrade Create table mappings checklist item. | |
execBulkCopyParameters | Runs the data upgrade Connect to source database checklist item. | |
execCheckList | Checks whether the installation checklist or the upgrade checklist has been completed, and then starts them if they are incomplete. | |
execCommand | Invokes other command methods in the SysAutoRun class. | |
execCompanyAccounts | Enables creating Microsoft Dynamics AX company accounts. | |
execCompileApplication | Compiles all the Microsoft Dynamics AX application or a specified section of the Application Object Tree (AOT). | |
execCompileIL | Compiles all the Microsoft Dynamics AX application X++ code to IL. | |
execConfiguration | Enables modification of the default Microsoft Dynamics AX configuration keys. | |
execDataImport | Imports data from a .dat file into a company account. | |
execDataImportSetBased | Imports data from a DAT file to a company account. | |
execHomePageProfileImport | ||
execLicenseInformation | Loads the license file for Microsoft Dynamics AX. | |
execPostSynchronizeDataUpgrade | Performs synchronization after a data upgrade. | |
execPreSynchronizeDataUpgrade | Performs synchronization before a data upgrade. | |
execPreventCheckList | Prevents the display of all checklists that run when Microsoft Dynamics AX starts. | |
execReportDeploymentSettings | Sets the report deployment settings. | |
execRun | Lets you run an X++ method or command when Microsoft Dynamics AX is started. | |
execRunXml | Enables you to reference and run other SysAutoRun configuration .xml files. | |
execStatistics | Determines whether Oracle update statistics are calculated. If this feature is enabled, it updates the statistics of the indexes used in Microsoft Dynamics AX. | |
execSynchronize | Synchronizes all the Microsoft Dynamics AX table definitions in the Application Object Tree (AOT) with those in the database server. | |
execSyncServiceUserAccount | Create the synchronization service admin user account. | |
execUserOptions | Enables or disables basic user options. | |
execute | ||
execWorkflowExecutionUserAccount | Creates the workflow execution user account. | |
execWorkflowSystemUserAccount | Creates the workflow system user account. | |
execXpoDelete | ||
execXpoImport | Enables X++ objects to be imported from .xpo files. | |
getAttributeValue | ||
getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) | |
handle | Retrieves the handle of the class of the object. (Inherited from Object.) | |
logError | ||
logInfo | ||
logSectionPrefix | ||
logSectionSuffix | ||
logSectionSuffixEmpty | ||
logWarning | ||
markCheckListItem | ||
new | Creates a new instance of the SysAutoRun Class. | |
notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) | |
notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) | |
objectOnServer | Determines whether the object is on a server. (Inherited from Object.) | |
owner | Returns the instance that owns the object. (Inherited from Object.) | |
parmCwd | Gets or sets the Cwd parameter. | |
parmExitWhenDone | Gets or sets the ExitWhenDone parameter. | |
parmLogFile | Gets or sets the LogFile parameter. | |
parmLogToScreen | Gets or sets the LogToScreen parameter. | |
setStorageElement | ||
setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) | |
toString | Returns a string that represents the current object. (Inherited from Object.) | |
usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) | |
wait | Pauses a process. (Inherited from Object.) | |
xml | Returns an XML string that represents the current object. (Inherited from Object.) | |
::construct | Creates a new SysAutoRun object by reading an .xml file. | |
::fileExistsServer |
Top
Remarks
The SysAutoRun class can also be used for testing and to run custom code when Microsoft Dynamics AX is started. The SysAutoRun class is also used to run initialization checklist items without the user interface. Configure Microsoft Dynamics AX by using a SysAutoRun configuration XML file. This XML file contains the elements that correspond to each step in the checklist that appears after you first install Microsoft Dynamics AX. If you use this file as a startup parameter, you can perform unattended automation of the checklist.
Create an XML file, for example, C:\Configuration.xml.
Add a root tag that specifies the Microsoft Dynamics AX version. You can also use the root tag to specify the path of a log file, how log information should be presented, and whether Microsoft Dynamics AX should be closed after the configuration file is run.
Add one or more tags that specify the tasks that you want to run and the attributes that are needed for these tasks.
Run ax32.exe and pass the configuration file as a parameter:ax32.exe -StartupCmd=AutoRun_c:\Configuration.XML
Wait as the system runs the requested tasks.
Check the log file for any errors.
Start using Microsoft Dynamics AX.
The root tag for the configuration file is called AxaptaAutoRun. For a description of the version, log file, and other options, see the parmCwd method, parmExitWhenDon method, parmLogFil method, and parmLogToScree method. The tags mentioned in step 3 are shown in the following example. The tags are also described in the help topics for the methods that have exec at the start of their name, in the SysAutoRun class. Each tag specifies a single task. Some tags have attributes that supply additional parameters, such as a name or the path of a file.
Examples
The following example shows the contents of a SysAutoRun configuration file.
<?xml version=”1.0” ?>
<AxaptaAutoRun
exitWhenDone="false"
version="4.0"
logFile="D:\Axapta\AxaptaAutorun.log">
<CompileApplication crossReference="false" />
<LicenseInformation file="d:\axapta\license.txt" />
<Configuration>
<ConfigurationKey name="SysUserLog" enabled="true" />
<ConfigurationKey name="PBA_AdvancedProductBuilder"
enabled="false" />
</Configuration>
<AdjustGlobalTypes>
<AccountNum length="24" adjustRight="false" />
<AmountMst displayLength="12" decimals="10" />
</AdjustGlobalTypes>
<Synchronize />
<UpdateCrossReference />
<UserGroups>
<UserGroup id="sales" name="Sales force" />
</UserGroups>
<Users>
<User id="MaryN"
name="Mary North"
email="someone@example.com"
language="en-us"
companyId="ex"
osAccount="MaryN"/>
</Users>
<CompanyAccounts>
<Company id="NWT" name="Northwind Traders" overwrite="true" />
</CompanyAccounts>
<XpoImport
file="d:\axapta\setup\XPO\Logger\Enum_TestLogEntryType.xpo" />
<DataImport companyId="BVT" file="d:\axapta\basedata.dat" />
<Run type="class" name="RunMyTests" method="main" />
<PreventCheckList />
</AxaptaAutoRun>
Inheritance Hierarchy
Object Class
SysAutoRun Class