web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Which Classes /Form is called to load modules

(0) ShareShare
ReportReport
Posted on by 504

Hi all, which class is called to load the list of all modules ? i have a scenario in which i have to hide some modules for specific Role. i did in SysNavPaneOptionsDialog form but modules can be hide/shown from many places , like in files->View->Modules .... so i dont want to add my desired module in list while loading ax for that specific role .

Any suggestions ?

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,168 Super User 2025 Season 2 on at

    Hi Syed,

    Is your question that you want to hide or show menus? These modules are nodes in the Main menu. The main menu can Be found in the AOT > Menus.

    When you grant access to a menu item by means of a privilege or duty the menus are enabled by default. As a user you can hide it from the main menu and enable or disable it again also using the files > View > Modules menu.

    If a menu item exists in multiple menus, then it is not possible to revoke a menu. E.g. the Customer list page is available in  menu Accounts Receivable and Sales and Marketing.

    The modules in the navigation page options are build with the command infolog.navPane().getButtons(). This seems to be part of the kernel, so we can't change this behavior.

  • Martin Dráb Profile Picture
    237,978 Most Valuable Professional on at

    That's not a wise approach. Use security to control access to menu items for individual roles.

  • Waji Profile Picture
    504 on at

    Hi martin , well basically i have to hide menu(Payroll and Hr ) for all users except hr manager and sysadmin.

  • Waji Profile Picture
    504 on at

    Hi andre ,

    Actually i want to hide that menu from users , actually i have achieved that by calling my custom class method in 'Info' class to hide that menu (payroll and hr), but user can change that using the files > View > Modules menu. so i want to hide my menu also from there.  there is a method to fill modules  which i came to know from SysNavPaneOptionsDialog form, "infolog.navPane().setCurrMenuButtons(Container)", so i received all the aot modules names from menunode.AOTname()  and pass only desired names in that container.

  • André Arnaud de Calavon Profile Picture
    301,168 Super User 2025 Season 2 on at

    Hi Syed,

    The best approach would be checking which menu items are in those menus for a certain role. Then try to find the related duties/privileges and remove these from the roles. You can use e.g. the security development tool to get some insight. Also you can browse in the AOT to e.g. the menu item. Then right click and choose Add-ins > Security tools > Vier related security roles. You will then get a list of the roles, with the duties and privileges which causes these menu items to be visible. (and thus also the menus).

    If the menu items left in these modules cannot do harm, you can consider to let the user just hide the menu. It is quicker...

  • Bashir Ahmad Profile Picture
    5,248 on at

    First you need to understand the client workspace:

    the following blog will help

    community.dynamics.com/.../default.aspx

    Area Page contain all the info:

    technet.microsoft.com/.../gg230970.aspx

    Please mark as answer if it help.

  • Verified answer
    Martin Dráb Profile Picture
    237,978 Most Valuable Professional on at

    The module will hide itself if users don't have access to any item there. Setting right permissions is the only correct way to implement your requirement.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans