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.


class SysAutoRun

Run On



  Method Description
Gg922801.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg922801.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg922801.protmethod(en-us,AX.60).gif execAdjustGlobalTypes Allows modification of properties on global data types in Microsoft Dynamics AX.
Gg922801.protmethod(en-us,AX.60).gif execBulkCopyDataUpgrade Performs synchronization after a data upgrade.
Gg922801.protmethod(en-us,AX.60).gif execBulkCopyMap Runs the data upgrade Create table mappings checklist item.
Gg922801.protmethod(en-us,AX.60).gif execBulkCopyParameters Runs the data upgrade Connect to source database checklist item.
Gg922801.protmethod(en-us,AX.60).gif execCheckList Checks whether the installation checklist or the upgrade checklist has been completed, and then starts them if they are incomplete.
Gg922801.protmethod(en-us,AX.60).gif execCommand Invokes other command methods in the SysAutoRun class.
Gg922801.protmethod(en-us,AX.60).gif execCompanyAccounts Enables creating Microsoft Dynamics AX company accounts.
Gg922801.protmethod(en-us,AX.60).gif execCompileApplication Compiles all the Microsoft Dynamics AX application or a specified section of the Application Object Tree (AOT).
Gg922801.protmethod(en-us,AX.60).gif execCompileIL Compiles all the Microsoft Dynamics AX application X++ code to IL.
Gg922801.protmethod(en-us,AX.60).gif execConfiguration Enables modification of the default Microsoft Dynamics AX configuration keys.
Gg922801.protmethod(en-us,AX.60).gif execDataImport Imports data from a .dat file into a company account.
Gg922801.protmethod(en-us,AX.60).gif execDataImportSetBased Imports data from a DAT file to a company account.
Gg922801.protmethod(en-us,AX.60).gif execHomePageProfileImport
Gg922801.protmethod(en-us,AX.60).gif execLicenseInformation Loads the license file for Microsoft Dynamics AX.
Gg922801.protmethod(en-us,AX.60).gif execPostSynchronizeDataUpgrade Performs synchronization after a data upgrade.
Gg922801.protmethod(en-us,AX.60).gif execPreSynchronizeDataUpgrade Performs synchronization before a data upgrade.
Gg922801.protmethod(en-us,AX.60).gif execPreventCheckList Prevents the display of all checklists that run when Microsoft Dynamics AX starts.
Gg922801.protmethod(en-us,AX.60).gif execReportDeploymentSettings Sets the report deployment settings.
Gg922801.protmethod(en-us,AX.60).gif execRun Lets you run an X++ method or command when Microsoft Dynamics AX is started.
Gg922801.protmethod(en-us,AX.60).gif execRunXml Enables you to reference and run other SysAutoRun configuration .xml files.
Gg922801.protmethod(en-us,AX.60).gif 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.
Gg922801.protmethod(en-us,AX.60).gif execSynchronize Synchronizes all the Microsoft Dynamics AX table definitions in the Application Object Tree (AOT) with those in the database server.
Gg922801.protmethod(en-us,AX.60).gif execSyncServiceUserAccount Create the synchronization service admin user account.
Gg922801.protmethod(en-us,AX.60).gif execUserOptions Enables or disables basic user options.
Gg922801.pubmethod(en-us,AX.60).gif execute
Gg922801.protmethod(en-us,AX.60).gif execWorkflowExecutionUserAccount Creates the workflow execution user account.
Gg922801.protmethod(en-us,AX.60).gif execWorkflowSystemUserAccount Creates the workflow system user account.
Gg922801.protmethod(en-us,AX.60).gif execXpoDelete
Gg922801.protmethod(en-us,AX.60).gif execXpoImport Enables X++ objects to be imported from .xpo files.
Gg922801.privmethod(en-us,AX.60).gif getAttributeValue
Gg922801.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg922801.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg922801.privmethod(en-us,AX.60).gif logError
Gg922801.privmethod(en-us,AX.60).gif logInfo
Gg922801.privmethod(en-us,AX.60).gif logSectionPrefix
Gg922801.privmethod(en-us,AX.60).gif logSectionSuffix
Gg922801.privmethod(en-us,AX.60).gif logSectionSuffixEmpty
Gg922801.privmethod(en-us,AX.60).gif logWarning
Gg922801.privmethod(en-us,AX.60).gif markCheckListItem
Gg922801.protmethod(en-us,AX.60).gif new Creates a new instance of the SysAutoRun Class.
Gg922801.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg922801.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg922801.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg922801.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg922801.pubmethod(en-us,AX.60).gif parmCwd Gets or sets the Cwd parameter.
Gg922801.pubmethod(en-us,AX.60).gif parmExitWhenDone Gets or sets the ExitWhenDone parameter.
Gg922801.pubmethod(en-us,AX.60).gif parmLogFile Gets or sets the LogFile parameter.
Gg922801.pubmethod(en-us,AX.60).gif parmLogToScreen Gets or sets the LogToScreen parameter.
Gg922801.pubmethod(en-us,AX.60).gif setStorageElement
Gg922801.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg922801.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg922801.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg922801.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg922801.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)
Gg922801.pubmethod(en-us,AX.60).gif Gg922801.static(en-us,AX.60).gif ::construct Creates a new SysAutoRun object by reading an .xml file.
Gg922801.protmethod(en-us,AX.60).gif Gg922801.static(en-us,AX.60).gif ::fileExistsServer



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.

  1. Create an XML file, for example, C:\Configuration.xml.

  2. 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.

  3. Add one or more tags that specify the tasks that you want to run and the attributes that are needed for these tasks.

  4. Run ax32.exe and pass the configuration file as a parameter:ax32.exe -StartupCmd=AutoRun_c:\Configuration.XML

  5. Wait as the system runs the requested tasks.

  6. Check the log file for any errors.

  7. 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.


The following example shows the contents of a SysAutoRun configuration file.

<?xml version=”1.0” ?>
 <CompileApplication crossReference="false" />  
 <LicenseInformation file="d:\axapta\license.txt" />  
    <ConfigurationKey name="SysUserLog" enabled="true" /> 
    <ConfigurationKey name="PBA_AdvancedProductBuilder"  
        enabled="false" /> 
    <AccountNum length="24" adjustRight="false" /> 
    <AmountMst displayLength="12" decimals="10" /> 
 <Synchronize />  
 <UpdateCrossReference />  
    <UserGroup id="sales" name="Sales force" /> 
  <User id="MaryN" 
      name="Mary North" 
     <Company id="NWT" name="Northwind Traders" overwrite="true" /> 
     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 />  

Inheritance Hierarchy

Object Class
  SysAutoRun Class

See Also

SysStartupCmdAutoRun Class