Menu
Cart 0

Adding A Menu Item For The Warehouse Management Mobile Client To The Tools Menu

Posted by Author, Curator, Visually Impared Squirrel Literacy Advocate & Dynamics AX Technical Solution Professional (TSP) at Microsoft on

Now that Dynamics AX R3 is available you may be working with the new Warehouse Management browser client. And if you are like me, opening up the browser window and then typing in the URL (http://localhost:82) may just be too much work and giving you serious carpel tunnel syndrome. Don’t worry though, if you want to write a couple of lines of code then you can easily add a menu item to your Tools menu that will open the mobile client up with just a click of the mouse.

It’s like having your own personal Stargate… sort of…

How To Do It…

  1. To start off, access the Tools menu by clicking on the Files menu and then clicking on the Tools sub-menu. There is more than enough space for another menu item.
  2. The first task that we need to do is create a Class within AOT that will open up the web page for us. To so that, open up AOT and then expand out the Classes folder.
  3. Right-mouse-click on the Classes folder itself, and select the New Class from the context menu.
  4. Now you should see a new generic Class.
  5. Change the Name field within the Properties pane to something a little more useful like WHSMobileDeviceBrowser and then double click on the class.
  6. This will open up the code editor for the Class.
  7. Press CTRL+N to create a new method for the class.
  8. And then change the method to be:
  9. static void main(Args _args)
    {
    infolog.urllookup(“http://localhost:82”);
    }
  10. Then close out the editor.
  11. To test the code, just right-mouse-click on the class and select the Open menu item.
  12. This should open up a browser window for you and take you straight to the mobile device portal.
  13. Now we need to create a Menu Item that will call the class. To do this open up the Menu Items group within AOT and expand out the Display group.
  14. Right-mouse-click on the Display node and select the New Menu Item option.
  15. This will create a new generic menu item for you.
  16. Change the Name property to something a little better than the default – like WHSOpenMobileDeviceBrowser.
  17. Then change the Client Type to Class.
  18. This will allow you to select your Class that you created in the last step.
  19. Finally, give the Menu Item a Label and Help Text before saving the change.
  20. You can test the Menu item just like you did with the Class by right-mouse-clicking on the menu item and selecting the Open menu item.
  21. If everything is configured correctly then the browser window should open up again.
  22. Now for the last step, which is to add the menu item to the Tools menu. To do this, open up the Menus group within AOT and find the GlobalToosMenu object.
  23. Right-mouse-click on it and select the New menu item and the Menu Item sub-menu option.
  24. This will add a new menu item to the end of the menu.
  25. From the MenuItemName dropdown, select the new menu item that you just created.
  26. This will automatically update the Menu Item Name for you.
  27. Now just save your changes to AOT.
  28. Now if you open up the Tools menu you will see a new menu item for opening the browser window.
  29. Clicking on the menu item takes you straight to the client.
  30. If you want to make it even better, you can make one small change – if you click on the login button, you will notice that the URL is slightly different.
  31. If you change the main() method to point to that URL rather than the base one then you will even bypass the splash screen.

Now we’re cooking with oil.

To download the full walkthrough with step by step images of the process, follow this link:

http://www.dynamicsaxcompanions.com/Tips-And-Tricks/Tips-Tricks-Archive/Adding-A-Menu-Item-For-The-Warehouse-Management-Mobile-Client-To-The-Tools-Menu



Share this post



← Older Post Newer Post →


Leave a comment

Please note, comments must be approved before they are published.