VS Tools - how to open a note window in the SOP Sales Transaction Entry form

This short example will demonstrate how to open note windows in the SOP Sales Transaction Entry form using Visual Studio Tools for Dynamics GP

The code is pretty self explanitory, we add an event handler in the Initialize method, and we show how to open 9 different windows. The hard part was figuring out what button went with what functionality, because they have semi cryptic names

 In our example below, we run of the CustomerNumberChanged event, and we open all the windows at one time.

If you use this code as-is you'll get some errors because some of the notes windows require something. For example the Batch note button requires a batch to open.

    Sub Initialize() Implements IDexterityAddIn.Initialize
        'add the event handler
        AddHandler Dynamics.Forms.SopEntry.SopEntry.CustomerNumber.Change, AddressOf SopEntry_CustomerNumber_Change
 
    End Sub
 
    Sub SopEntry_CustomerNumber_Change(ByVal sender As ObjectByVal e As System.EventArgs)
        Try
            'open the currency setup window
            Dynamics.Forms.SopEntry.SopEntry.CustomLinksZoomButton1.RunValidate()
 
            'open the DOCID comment window
            Dynamics.Forms.SopEntry.SopEntry.NoteArrayAbsentWindowArea1.RunValidate()
 
            'open the SOPNUMBE comment window
            Dynamics.Forms.SopEntry.SopEntry.NoteArrayAbsentWindowArea2.RunValidate()
 
            'open the LOCNCODE comment window
            Dynamics.Forms.SopEntry.SopEntry.NoteArrayAbsentWindowArea3.RunValidate()
 
            'open the batch comment window
            Dynamics.Forms.SopEntry.SopEntry.NoteArrayAbsentWindowArea4.RunValidate()
 
            'open the CUSTNMBR comment window
            Dynamics.Forms.SopEntry.SopEntry.NoteArrayAbsentWindowArea5.RunValidate()
 
            'open the currency comment window
            Dynamics.Forms.SopEntry.SopEntry.NoteArrayAbsentWindowArea6.RunValidate()
 
            'open the itemnmbr comment window
            Dynamics.Forms.SopEntry.SopEntry.NoteArrayAbsentWindowArea7.RunValidate()
 
            'open the comment comment window
            Dynamics.Forms.SopEntry.SopEntry.NoteArrayAbsentWindowArea8.RunValidate()
 
 
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

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