Export (0) Print
Expand All
Expand Minimize

SysAutoRun Class

Enables system administrators to configure Microsoft Dynamics AX by supplying the Microsoft Dynamics AX client with an .xml file that contains configuration commands. The SysAutoRun class can also be used for testing purposes and to run custom code when Microsoft Dynamics AX is started.

NoteNote

To use the SysAutoRun configuration .xml file, see the Remarks section later in this topic.



class SysAutoRun

Called

Method

Description

construct

Creates a new SysAutoRun object by reading an .xml file.

execAdjustGlobalTypes

Allows modification of properties on global data types in Microsoft Dynamics AX.

execCheckList

Checks whether the installation checklist or the upgrade checklist has been completed, and then starts them if they are not complete.

execCommand

Invokes other command methods in the SysAutoRun class.

execCompanyAccounts

Enables the creation of Microsoft Dynamics AX company accounts.

execCompileApplication

Compiles the entire Microsoft Dynamics AX application, or a specified portion of the Application Object Tree (AOT).

execConfiguration

Enables modification of the default Microsoft Dynamics AX configuration keys.

execDataCleanup

Reserved.

execDataImport

Imports data from a .dat file into a company account.

execLicenseInformation

Loads the license file for Microsoft Dynamics AX.

execPostSynchronizeDataUpgrade

Performs synchronization after a data upgrade.

execPreSynchronizeDataUpgrade

Performs synchronization prior to a data upgrade.

execPreventCheckList

Prevents the display of all checklists that run when Microsoft Dynamics AX starts.

execRun

Enables you to run an X++ method when Microsoft Dynamics AX is started.

execRunXml

Enables you to reference and run other SysAutoRun configuration XML files.

execSQLInstall

Sets up the Oracle database for use with Microsoft Dynamics AX.

execStatistics

Determines whether Oracle update statistics are calculated.

execSynchronize

Synchronizes all the Microsoft Dynamics AX table definitions in the Application Object Tree (AOT) with those in the database server.

execUpdateCrossReference

Updates the cross-reference tables in Microsoft Dynamics AX.

execUserGroups

Creates user groups in Microsoft Dynamics AX.

execUserOptions

Enables or disables basic user options.

execUsers

Enables creation of Microsoft Dynamics AX users.

execute

Reserved.

execXpoImport

Enables X++ objects to be imported from .xpo files.

fileExistsServer

Reserved.

getAttributeValue

Reserved.

logError

Reserved.

logInfo

Reserved.

logSectionPrefix

Reserved.

logSectionSuffix

Reserved.

logSectionSuffixEmpty

Reserved.

logWarning

Reserved.

markCheckListItem

Reserved.

new

Creates a new instance of the SysAutoRun class.

parmCwd

Gets or sets the value of the cwd attribute.

parmExitWhenDone

Gets or sets the value of the exitWhenDone attribute.

parmLogFile

Gets or sets the location and name of the SysAutoRun log file.

parmLogToScreen

Gets or sets the value of the LogToScreen attribute.

setStorageElement

Reserved.

Configure Microsoft Dynamics AX by using a SysAutoRun configuration XML file.

  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 to 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 task(s) that you want to run and the attributes needed for these tasks.

  4. Run ax32.exe with the following parameter:

    StartupCmd=AutoRun_c:\Configuration.XML

  5. Wait while 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, parmExitWhenDone, parmLogFile, and parmLogToScreen methods.

The tags mentioned in step 3 are shown in the following example, and described in the Help topics for the SysAutoRunexec* methods. For a list of these methods, see the previous Methods table. Each tag specifies a single task. Some tags have attributes that supply additional parameters, such as a name or the path to a file.

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

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

Community Additions

ADD
Show:
© 2014 Microsoft