Export (0) Print
Expand All
Expand Minimize

SysAutoRun.execRun Method

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


protected boolean execRun(XmlNode _command)

Client

Parameter

Description

_command

The XML node to get the value from.

true if execution is successful; otherwise, false.

The execRun method is called when the <Run> tag is used in the configuration file when Microsoft Dynamics AX is started. For more information, see the SysAutoRun class.

Execution of this method is controlled by the SysAutoRun.execCommand method.

The <Run> tag has the following attributes:

  • type - Specifies the kind of application object where the method or menu item is found. The possible values are:

    • class

    • actionMenuItem

    • displayMenuItem

    • outputMenuItem

  • name - The name of the class that contains the method to be run or the name of a menu item. If a class name is used, it must be instantiated by a new method. Abstract classes cannot be used.

  • method - The name of the method to be run. If you do not specify a method name, the main method in the class is run.

  • parameters - Specifies one or more parameters that should be passed to the method. Only simple data types and methods on the Global class can be used as parameters. Parameters cannot be specified for static void main(Args _args) methods.

NoteNote

Return values are not supported.


The following example shows a possible use of the <Run> tag in the configuration file.

<Run type="class" name="MyClass" method="run" 
    parameters="'my text',7" />

Community Additions

ADD
Show:
© 2014 Microsoft