AX Client - Run code Runs a job, static class method or a menu item of an AX 2009/2012 environment

AX Client - Run code
AX Client - Run code
Topic Work with AX client (AX 2009/2012)
Description Runs a job, static class method or a menu item of an AX 2009/2012 environment
Category Utility
Special features
  • Runs a job
  • Runs a static class method with parameters
  • Runs a menu item.
    • Action
    • Display
    • Output
Microsoft documentation https://msdn.microsoft.com/en-us/library/sysautorun.execrun.aspx
Parameter: Run mode
Description How should the step be executed? Possible values are "Direct", or "Batch.
Type Picklist
Required True
Default value Direct
Parameter: Object type
Description What object type should be run? Possible values are "Job", "Static class method", "Menu item". Please note that Object type "Job" is not supported by all versions of Microsoft Dynamics AX.
Type Picklist
Required True
Default value Job
Parameter: Job name
Description Specifies the name of the job to execute.
Type String
Required True
Default value
Dependency Only visible if Object type is "Job"
Example value MyJob
Parameter: Class name
Description Specifies the name of the class to run.
Type String
Required True
Default value
Dependency Only visible if Object type is "Static class method"
Example value MyClass
Parameter: Method name
Description Specifies the name of the static method to execute. If empty "main" is used.
Type String
Required False
Default value
Dependency Only visible if Object type is "Static class method"
Example value MyStaticMethod
Parameter: Parameters
Description Specify parameters which should be added.
Type String
Required False
Default value
Dependency Only visible if Object type is "Static class method"
Example value 'MyString', 100
Parameter: Menu item type
Description What menu item type should be run? Possible values are "Action", "Display", or "Output".
Type Picklist
Required True
Default value Action
Dependency Only visible if Object type is "Menu item"
Example value MyActionMenuItem
Parameter: Client config file path (.axc)
Description The file path of the client configuration file.
Type File path
Required True
Default value
Dependency Only visible if Run mode is "Direct"
Example value $/Microsoft Dynamics AX (Test)/Client.axc
Parameter: Log file path (*.log)
Description The file path to save the log file to.
Type File path
Required True
Default value
Dependency Only visible if Run mode is "Direct"
Example value $/Microsoft Dynamics AX (Test)/MyAutorunLogFile.log
Parameter: Layer name
Description Specifies which layer to open in the AOT.
Type String
Required False
Default value
Dependency Only visible if Run mode is "Direct"
Example value VAR
Parameter: Layer code
Description Specifies the developer license code for developer options.
Type String
Required False
Default value
Dependency Only visible if Run mode is "Direct"
Example value SDSA43432DSADSADAS
Parameter: Model name
Description The "current model" is the model where all new AOT elements are created in.
Type String
Required False
Default value
Dependency Only visible if Run mode is "Direct"
Example value MyModel
Parameter: Max wait time (min)
Description The number of minutes to wait before failing the step.
Type Integer
Required False
Default value 120
Dependency Only visible if Run mode is "Direct"
Parameter: AutoRun file path (*.xml)
Description The autorun file to append the build step to.
Type File path
Required True
Default value
Dependency Only visible if Run mode is "Batch"
Example value $/Microsoft Dynamics AX (Test)/MyAutorunFile.xml

Frequently asked questions

Error message "Unsupported type job specified for run command."

The Object type "Job" is not supported by all version of Microsoft Dynamics AX. If so in your installation, you have to do some customization to support it. Maybe you could copy the required code in "SysAutoRun.execRun" from Microsoft Dynamics AX 2012 R3. Please see Microsoft site for more informations.


Go back