Launch web page from a Dynamics GP 9 Form

Posted on 2014-08-18
Last Modified: 2016-02-11
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?

Question by:jdr0606
    LVL 18

    Expert Comment

    by:Steve Endow

    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

    Accepted Solution

    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

    Author Closing Comment

    Resolved myself and entered the result in the ticket

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
    This collection of functions covers all the normal rounding methods of just about any numeric value.
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
    The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now