0

I would like to redirect some of my users to a specific form in aot when they open dynamics ax 2009. What is the best way to that? Today, they directly go to the role center page.

Thanks

bobo98
  • 1

2 Answers2

2

You're asking 2 questions here: how to open a specific form from the code, and how to get something done automatically when AX is opened.

I don't have an access to AX at this moment but the following code should help you with the first question.

FormRun formRun;
;

formRun = new MenuFunction(menuitemdisplaystr(___FormMenuItemName___), MenuItemType::Display).create(new Args(this));
formRun.init();
formRun.run();
formRun.detach();

As to the second question, you just need to add your code to method StartupPost of either Application or Info class.

10p
  • 5,488
  • 22
  • 30
1

Firstly you have to create a menu item for the form.

Then in the Info class, modify the startupPost() method by calling the menu item:

new MenuFunction(menuitemDisplayStr(YourMenuItem), MenuItemType::Display).run();

Celeste
  • 106
  • 1
  • 13