How to: Import a Class on Startup [AX 2012]
Updated: September 13, 2011
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
You can import a class, and execute methods within it without user interaction by starting Microsoft Dynamics AX from the command line with an XML file as input parameter. The XML file specifies the class and methods to use. The result of importing and executing is written to a log file or shown to the user in Infolog.
Executing with no user interaction is useful for any automation of customer tasks, in particular during the test phase.
-
On the Microsoft Dynamics AX client computer, create an XML file.
-
Add tags to the XML file specifying:
-
The Microsoft Dynamics AX version.
-
The name and location of the log file.
-
The XPO file that contains the class to import.
-
The method to run.
Note The XML file syntax is described in the documentation for the SysAutoRun Class.
-
-
Open a command line window and type
ax32.exe -StartupCmd=AutoRun_ c:\folder\filename .XML
Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.