I have a form in D365 FO with a menu item button in it and i just want to hide that button for some specific security roles.how to create privilege to hide that menuitem button to be included to security roles .
Hi Harish,
If you are talking about a menu item button, then I would not suggest using the NeededPermission property, but ensure the privilege does not have the menu item with permissions. If you are using standard privileges, you can create a copy of it and remove the particular menu item.
The idea of hiding a menu item if it is part of a privilege can also be achieve by deny permissions, but that has a side effect that the user will never be able to see the menu item, even if another role provides access.
If the object is a button control (without menu item object), then you can follow the suggestion from Girish.
Hi Harish,
You can make use of needed permission property to manual on the menu item button control and add that to security privilege.
Refer to the below blog.
Thanks,
Girish S.
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156