We have a custom GP Addin where a number of menu items are being added via the AddMenuHandler function. However, these menu items are showing up in both of the client's GP companies and they want them to only display in a single GP company.
Since there is no RemoveMenuHandler function available, is there another approach that can be taken with Visual Studio Tools for Dynamics GP to accomplish this?
There is no simple method of removing the VSTools equivalent of a Dexterity Form Menu Trigger used by the AddMenuHandler function. You could write code that checks the company logged into and then applies the form menus, but that would not handle switching between companies or preventing it adding the menu multiple times.
I would suggest that you add some code to the menu handling scripts that checks which company is active and displays a dialog and cancels when not needed. It won't hide it from other companies but will stop it doing anything.
FYI: If you used Dexterity or GP Power Tools to add the form menus, you would be able to enable and disable them dependent on which company you were logged into.
Was this reply helpful?YesNo
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.