Skip to main content
Dynamics 365 Community / Forums / Finance forum / How to hide menuitem o...
Finance forum
Suggested answer

How to hide menuitem on menu ?

editSubscribe (0) ShareShare
ReportReport
Posted on by 321
Hi guys,

Is there a way to hide menuitems under menus by X++ code ?

Regards.
  • Martin Dráb Profile Picture
    Martin Dráb 222,562 Super User on at
    How to hide menuitem on menu ?
    Okay... I wasn't aware of SysMenuNavigationObjectFactory class. Good to know.
  • Suggested answer
    Andre Arnaud de Calavon Profile Picture
    Andre Arnaud de Cal... 282,978 Super User on at
    How to hide menuitem on menu ?
    Hi Awaxx,
     
    Actually, this is possible. Microsoft has several examples where they show or hide menu items part of a menu. You can find an example in the class ExpenseFeatureManagementShowHideMenuItems.
     
    You must use it only when it is needed. Don't use this for replacing security. Microsoft is using it to show an old or a new enhanced version of forms or workspaces.
  • Awaxx Profile Picture
    Awaxx 321 on at
    How to hide menuitem on menu ?
    Thank you Martin
  • Martin Dráb Profile Picture
    Martin Dráb 222,562 Super User on at
    How to hide menuitem on menu ?
    No, you can't use X++ to hide elements of the main menu. If you want a user not seeing a menu item, don't give the user any permissions for it.

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Sundar…

Industry experts answer burning questions directly from our amazing Community…

Enabling Copilot Case and Conversation…

Agents can easily recap an ongoing chat, transcribe a voice conversation…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 282,978 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,562 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans