Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Adding a button to all GP forms

Posted on by Microsoft Employee

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?

*This post is locked for comments

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,928 Most Valuable Professional 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.

    Regards

    David

  • Community Member Profile Picture
    Community Member Microsoft Employee 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 Microsoft Employee 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.

    twitter.com/.../1065038563111129088

  • 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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans