Launch web page from a Dynamics GP 9 Form

I have a Dynamics GP 9 form with a added button that a previous developer had added which would pass a part number and launch an internal web page.

I need to add a similar function to another form but for the life of me I can't figure out how that was done
  Any help?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steve EndowMicrosoft MVP - Dynamics GPCommented:

I've never done that specific type of customization to launch a browser, but there are two techniques that I can think of to do that.

When you open the existing window with the custom button that opens a web page, look at the title of the window, in the upper left corner.  Do you see a period before or after the window name?  If so, that indicates it was modified using the GP Modifier & VBA tool.  If this is the case, try pressing ALT+F11 to open the VBA editor and let me know if you see some VBA code.

If there is no period before or after the window name, that likely indicates it was modified using Dexterity, the native Dynamics GP.  In that case, it is a customized Dex window and wouldn't be something you could reproduce without knowing Dexterity.

Let me know what you find.


Steve Endow
Microsoft MVP - Dynamics GP
Dynamics GP Certified IT Professional
jdr0606Author Commented:
I have resolved the issue myself.

The form in question already had VBA and form modifications (. before and after)

I opened the form to modify and added a button.
Moved the button to the desired location on the form and changed the field name reference (optional), in my case I used "PrintDocuments"
Saved the modified form
Opened the form as normal in GP and then selected the Tools-Customize->add fields to Visual Basics and clicked on the new button on the form (representing "PrintDocuments")
I then opened the VBA editor selected the code for the modified form and then selected the code reference "PrintDocuments" location for the named button field and then added the desired VBA code something like this

Private Sub PrintDocuments_BeforeUserChanged(KeepFocus As Boolean, CancelLogic As Boolean)
Dim Str1 As String
If DocumentNo.value = "" Then
    MsgBox " Document number is blank"
    If TypeTypeID.value = 1 Or TypeTypeID.value = 2 Then
               Str1 = ""
            ShellExecute 0, "open", Str1, 0, 0, 1
        MsgBox "Can only print Order or Quote"
    End If
End If

End Sub

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jdr0606Author Commented:
Resolved myself and entered the result in the ticket
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Dynamics

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.