Your first Web Client VSTools mod

This article details your first web client mod. 

Our lot in life is not 'detailed program specifications', we do 'RAD'. Rapid development. 

So, in as few words as possible:

 

Related Articles

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

Here's a walk through of your first VS Tools Web Client mod. This is just enough to prove that it works, no more. 

We're depending on the web site being configured to use the standard GP folder as its source code. 

Create a STANDARD VS Tools app. Our install had a Web Client template, but that did not work, it threw quite a few errors 

In the project, make this edit in the Compile tab

Make this edit in the Debug tab

These two edits will compile your code in the correct directory. If you were to run the project, Dynamics GP would open

Create a CLASS called Req:

Imports Microsoft.Dexterity.Bridge
Imports Microsoft.Dexterity.Applications
Imports System.ComponentModel
 
Public Class Req
    Friend Sub open(sender As Object, e As EventArgs)
        Dim answer As Int16 = Dynamics.Forms.SyVisualStudioHelper.Functions.DexAsk.Invoke("Should Steve be King?", "Yes", "No", "Cancel")
 
    End Sub
 
    Friend Sub SaveBeforeOriginal(sender As Object, e As CancelEventArgs)
        Try
            Dim answer2 As Int16 = Dynamics.Forms.SyVisualStudioHelper.Functions.DexAsk.Invoke("Should Steve2 be King?", "Yes", "No", "Cancel")
 
        Catch ex As Exception
            Dim answer3 As Int16 = Dynamics.Forms.SyVisualStudioHelper.Functions.DexAsk.Invoke("Should Steve3 be King?", "Yes", "No", "Cancel")
 
        End Try
    End Sub
End Class

in the GpAddin class:

Imports Microsoft.VisualBasic
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports Microsoft.Dexterity.Bridge
Imports Microsoft.Dexterity.Applications
 
<SupportedDexPlatforms(DexPlatforms.DesktopClient Or DexPlatforms.WebClient)>
Public Class GPAddIn
    Implements IDexterityAddIn
    Dim oReq As New Req
    ' IDexterityAddIn interface
    Sub Initialize() Implements IDexterityAddIn.Initialize
        Dim answer As Int16 = Dynamics.Forms.SyVisualStudioHelper.Functions.DexAsk.Invoke("Steve welcomes you", "OK", "", "")
        AddHandler Dynamics.Forms.PopRequisitionEntry.PopRequisitionEntry.OpenAfterOriginal, AddressOf oReq.open
        AddHandler Dynamics.Forms.PopRequisitionEntry.PopRequisitionEntry.SaveButton.ClickBeforeOriginal, AddressOf oReq.SaveBeforeOriginal
    End Sub
 
End Class

Compile the project, and open the Purchase Requisitions window to see the results of your work. 

 

 

 

 


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