Disable context menu option using previlege

Hi All,

Can anyone tell me how to disable the “edit record” option in the right click context menu(Refer screenshot) by using previleges(Permissions)…???

Thanks in Advance…

Do you mean on all the forms? What is the purpose of doing that? Why cannot you make the relevant table view access?

Hi Kranthi,
No…I have to provide read only access to one menuitem…But In the context menu the edit record option is visibile…I have to disable that…I have already added the table access in permissions…

Does it allows the user to edit the record after clicking that (even after providing the view access to table in permissions)?

Hi,
No…The option is not working…The problem is I have to hide that menu option…

Hi,
Is this possible…?

So you cannot edit the data but the edit record is visible and you want to hide it. Is that your requirement?

Hi,
Yeah…Exactly…

I think it cannot be handled with the security in AX.
If you see in any form, even if you are not allowed to edit the data the Edit record and View record are enabled on the context menu.In such case, clicking on view record will enables the hyper links and edit record disables them.

Hi,
Any other possibilities…???(using x++ code)

Hi,
Like jumpref() method for view details…

msdn.microsoft.com/…/aa674954.aspx

Hi kranthi,
No context method in my form…How can i disable that…???

It is showContextMenu method. The menu is handled by the system, but with this method you control menu related to a form control. I don’t think your case can be handled.

To understand/debug this method, look at \Forms\OMOperatingUnit\Designs\DesignList\ContactInfo_Locator\Methods\showContextMenu

Hi Kranthi,
Thanks for ur reply…Any other possiblities…???.

I don’t think there is any other possibility
Even if you set the data source allow edit to No, the Edit record function is available. So it is still kept to disable the view mode.

Hi Kranthi,

Thanks for the replies…Pls tell me to how to provide readonly access to action-menuitem using previleges(see the screen shot)

Just I need to make the cleanuplog menubutton as readonly(It should be visible but uneditable)…

That may not be possible.
If you give no access ,then the button is not visible.
If you even give the lowest access level - Read, the button is visible and enabled.

But you can handle this by doing code change (by considering the access level for that menu item).