In AX 2009, the user has no control over which menu is opened in the navigation pane and address bar when AX client is started.
Most of the time you simply get the Home page, which is frustrating for a number of users. Another thing that is frustrating for them is the company account the application opens with.
The latter can actually be setup using standard application functionality in the User options form. Just set the
'Start company accounts' to the account you want for the user by default.
I wrote a small tool, that allows the user to select a preferred startup menu, ensuring that this menu is the one open every time AX client is started. Something similar existed in Axapta 3.0 application.
You can download the
xpo for this tool from my SkyDrive.
Note, that it contains minor changes to a number of existing application objects.
I suggest that you compare the xpo from the import dialog and ensure that you don't override any of your changes during import - the best thing would be to re-implement these minor changes manually. Below is a list of changes that I am referring to above:
- SysUserInfo table - 1 new field was added
- SysUserSetup form - 1 new control was added. Lookup method on datasource field overridden
- Info class - startupPost method changed
In order to enable the functionality, simply select one of the menus in the User options, as shown in the below screenshot. Next time you start AX, the selected menu will be open by default.
Below is a short listing of "code patterns" used in the project, that can serve as examples for your future projects:
- SysTableLookup - for displaying a lookup form with a list of menus
- infolog.globalCache() - for storing a global reference to the navigator class
- TreeNode iteration - for finding all menu references in MainMenu
- QueryBuild classes - for constructing and filtering a list of menu references in MainMenu, used in the lookup form
- infolog.addTimeOut() method - for scheduling execution of another method in a set period of time
Really, very good idea Ivan and good work.
ReplyDeleteWe used it extremely on our company for our different department teams in Ax3 now we could also use it for Ax2009 using your project.
Many Thanks Ivan.
hani mohd
toti96@yahoo.com
how can i make this un-done. thnks! I am getting errors. It is giving me errors at:
ReplyDelete#void startupPost()
Well, you should just see what is different in the xpo, and remove that.
ReplyDeleteBut it should not give you errors. What specifically are the errors you see?
Hi Yvan.
ReplyDeleteI integrated your tool user preferred startup menu....nice tool.
With the current menus it works perfect.
With menus made by us it doesn't work.
Can it has to do something with this code
infolog.navPane().selectedGroup(SysUserInfo::find().StartupMenu);
Is ther some code to startup our own menus
thanks geert
gvaneeckhout@deknudtmirrors.com
Hmm. I think it should be able to show the user menus as well. Strange
ReplyDeleteNo, the code you posted above is just selecting the menu.
You should look into the lookup - they should show up there (in the user options).
HI,
ReplyDeletecan you tell me where to modify to control the companies on the navigation pane. i want to restrict the user groups to particular companies. i have done it on the sysdataarea select form looking to restrict from the address bar as well.
Regards
You should be able to limit the available companies through setting up security restrictions for data in DataArea table, as far as I know.
ReplyDeleteI don't know of a way to restrict access specifically to the list in the address bar.
very useful... thanks for this
ReplyDeleteHello,
ReplyDeleteVery good job, very interesting. But I have a problem with the lookup method of the startmenu field. The first time, the menu list is correct, if I clik a second time on the lookup field, the same menu is visible several time il the menu list. I didn't find where to modify that.
Have you idea about this problem?
Thank you for your help.
Reagrds
Hello,
ReplyDeleteSorry, I forgot to leave my email address in the previous post : nobug51@hotmail.com
About my previous post, I found this : if the startmenu field is blank, the menu list (in the lookup field) is correct.
After selected a menu in the list, for example Administration menu, if you click a second time in the lookup field, there are 5 times the administration menu : 5 is the layer number where there is developments. If the startmenu isn't blank, it seems that the code queryBuildDataSource.addGroupByField isn't executed. If you delete the startmenu, in the lookup, there is a only one administration menu in the list.
That's weird. Have you a idea about that?
Regards.
Hello,
ReplyDeleteI have a problem with the lookup method of the startmenu field. The first time, the menu list is correct, if I clik a second time on the lookup field, the same menu is visible several time il the menu list. For example, the first time the administration menu appears only one time in the lookup field. If you select a menu in the list, you click a new time in the lookup field, the administration menu appears 5 times. I think there is a link with the different layers where there was developments. It would seem the code querydatasource.addgroupfield isn't executed. If you delete the startmenu (blank), no problem, after selection of startmenu, the same menu appears many times.
I didn't where is the problem, are you an idea about that?
Thank you for your help
My details : jeanclaude.ragon@gmail.com
Thanks for such a wonderful post. Appreciate it.
ReplyDeleteIs it also possible to change the initial splash AX screen to our company logo? Thanks in advance.
Hi Santosh,
ReplyDeleteI don't think it is possible to change the AX screen without modifying the executable, which I cannot talk about
This is interesting topic but your link to xpo was invalid. Could you please provide with latest link?
ReplyDeleteUpdated the link.
DeleteDo note this is quite old - so meant for older Dynamics AX versions