Make Form/Report run automatically when dynamics Ax Starts

When ax starts Kernel Creates an instance of Info class .
Info contains StartupPost() method used to execute the code every time ax starts.

Following example opens InventTable Form automatically when you start ax.

void startupPost()
SysSetupFormRun formRun;
Args args = new Args();
formRun = classfactory::formRunClassOnClient(args);

So if you have any task that has to be executed every time ax start , then this is the best place to put your code.

Import Data on Startup without User Interaction.

Particularly during the test phase , its useful to import the data without user interaction.
You can do this from command line with xml file as parameter.

Steps 1 : Create an XML File as below, which specifies
a. axapta version
b. Name and Location of LogFile
c. Path of data file to be imported.

Steps 2 : Open a commandLine window and type
ax32.exe –StartupCmd=AutoRun_c:\folder\filename.XML

SysAutRun Class conatins macro for XMl Elements.
For e.g can be used for importing XPO's at startup.

AX Application Explorer in Visual Studio

Check out the new tool developed by the Developer and partner tool group of dynamics Ax for Ax style coding in visual studio.

AX Application Explorer in Visual studio