SBX - Search With Button

SBX - Forum Post Title

Hiding Menus for security role.

Microsoft Dynamics AX Forum

Vkunchakuri asked a question on 13 Jun 2018 1:42 PM

Question Status

Verified

Hello all,

I am working on security project and I use SDT to hide and show the menus. While doing so, I found a strange behavior in Accounts payable vendor form. In the "All vendors" form, "General tab", I need to hide "print management" menu for a specific role.

but this is no menu item. It is button with clicked method. Can you give me ideas on what can be done here?

Also another question on the same all vendors  form, I have restricted everything from "Procurement tab", still, it shows up without any menus. How can I hide the tab as well?

Reply
Verified Answer

Hi Vkunchakuri,

When you want to hide a button control, you have to change the form design (if it is not already set to the correct setting). The property NeededPermission of this button needs to be set to the value 'Manual'. Then initially nobody will see this button. When persons do need access, you can add the form control to a privilege or the security role on the permissions node.

Can you share what you have done for the second question? Eventually, you can also set the NeededPermission for the tab page, but maybe, there is another option.

Reply
Vkunchakuri responded on 15 Jun 2018 8:10 AM

Thank you Andre,

I just want to hide this for 1 particular role, so is there a reverse way of doing it? so with the above possibility that you have given, the button is usually is hidden and can be visible for particular roles. Is there way that usually it is visible and can be hidden for one particular role?

for second question, I just removed the access for all menus in that tab page.

Thanks,

VKunchakuri.

Reply

Hi VKunchakuri,

Unfortunately, there is no other way for hiding the button in only one role.

For the second question. Can you check the property of the tab page called 'HideIfEmpty' (if exists for tab pages)?

Reply
Mahmoud Hakim responded on 18 Jun 2018 11:35 PM
My Badges
Verified Answer

you can use the NeededPermission as Andre mention you or make some customization

Reply
Vkunchakuri responded on 21 Jun 2018 8:53 AM

OK, Thank you so much for you help.

Reply
Verified Answer

Hi Vkunchakuri,

When you want to hide a button control, you have to change the form design (if it is not already set to the correct setting). The property NeededPermission of this button needs to be set to the value 'Manual'. Then initially nobody will see this button. When persons do need access, you can add the form control to a privilege or the security role on the permissions node.

Can you share what you have done for the second question? Eventually, you can also set the NeededPermission for the tab page, but maybe, there is another option.

Reply
Mahmoud Hakim responded on 18 Jun 2018 11:35 PM
My Badges
Verified Answer

you can use the NeededPermission as Andre mention you or make some customization

Reply

SBX - Two Col Forum

SBX - Migrated JS