Code to handle a custom button click

So, you've modified a form and added a button (not covered here)

Then, you've run Dag.exe against your GP installation

Then, you copied Application.MicrosoftDynamicsGP.ModifiedForms to your bin folder and set a reference to it

Now, we'll show you the code that will allow you to handle a custom button click. The code here is specific to one custom button added to one GP form, you'll have to edit those things for your form.

Related Articles

... and you 'll find more on the VS Tools Menu

 This code goes in GpAddIn.vb

Imports Microsoft.VisualBasic
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports Microsoft.Dexterity.Bridge
Imports Microsoft.Dexterity.Applications
Imports Microsoft.Dexterity.Applications.MicrosoftDynamicsGpModified
 
Public Class GPAddIn
    Implements IDexterityAddIn
    Dim oEditCheckBatch As New EditCheckBatch
    ' IDexterityAddIn interface
 
    Sub Initialize() Implements IDexterityAddin.Initialize
        AddHandler MicrosoftDynamicsGpModified.Forms.PmEditCheckBatch.EditCheckBatch.LocalProcessHoldbacks.ClickAfterOriginal, AddressOf oEditCheckBatch.ProcessHoldbacks_Click
 
    End Sub
 
End Class
 

This is the code for the Form Class

Public Class EditCheckBatch
    Sub ProcessHoldbacks_Click(sender As Object, e As System.EventArgs)
 
    End Sub
End Class

 

 

 

 


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences