Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Remove Custom Menu Item In Specific Company

(0) ShareShare
ReportReport
Posted on by 123
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?
Categories:
  • Verified answer
    David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,965 Most Valuable Professional on at
    Remove Custom Menu Item In Specific Company
    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.

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.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,387 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans