Skip to main content
Microsoft Dynamics GP forum
Suggested answer

Adding a button to all GP forms

editSubscribe (1) ShareShare
Posted on by UG Leader

I am looking for a way to add a button to ALL GP forms. Is there a way to do that without having to build a modifier for each form? 
Also, is there a way for these buttons to tie back to events of forms that is currently open? Maybe through system.reflection?

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,781 Super User on at
    RE: Adding a button to all GP forms

    You can add a menu item to all windows in the application using Dexterity.

    There are two approaches:

    1) add a menu item to the Tools menu which will be a single entry shared by all windows. (does not work for web client). With this method you cannot tell which window the menu was selected from.

    2) add dynamic form triggers on windows as they are opened this will add an additional menu to the window and you can tell which window the menu was selected from. And it works on the web client.



  • Community Member Profile Picture
    Community Member UG Leader on at
    RE: Adding a button to all GP forms

    List boxes, Drop down lists, Combo Boxes can be added using modifier to Dynamics GP forms, but they are not supported for .NET access from visual studio addins. mobdro

  • Community Member Profile Picture
    Community Member UG Leader on at
    RE: Adding a button to all GP forms

    how would one add a button though. Assuming one can lookup the class names etc of the forms, how would one add the button is the part i dont understand

  • Suggested answer
    steveendow Profile Picture
    steveendow 2,281 on at
    RE: Adding a button to all GP forms

    Since you mention Modifier and System.Reflection, I assume you are looking to use .NET to do this?

    I have tried for several years to add a button to a GP form without using Modifier, but so far, it has not been practical.  A colleague and I developed a solution that would allow you to use VS Tools to add a custom .NET button on any GP window, but the prototype wasn't reliable enough. It is quite difficult to overlay a control on a GP window reliably--positioning, resolution, resizing, moving, etc. are challenging.

    I believe David Musgrave may be looking to add some functionality to his Visual Studio Integration Toolkit that would allow for custom controls that could be added to Dex forms using .NET, and perhaps also creating custom windows using .NET.  Those controls and windows could then be managed by .NET.  But it requires a Dex intermediate layer to create those objects.

    It would then be possible to add the controls onto GP windows using Reflection, and also capture events using Reflection.  I have used Reflection with VS Tools AddIns to attach event handlers to multiple windows, and it works well.

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: Adding a button to all GP forms

    That would be a monumental task but it could be done. You would have to identify every desired window and define several values for each window and store these values in either an xml file or a SQL table.

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Sundar…

Industry experts answer burning questions directly from our amazing Community…

Enabling Copilot Case and Conversation…

Agents can easily recap an ongoing chat, transcribe a voice conversation…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 282,978 Super User

Martin Dráb Profile Picture

Martin Dráb 222,562 Super User

nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans