Site Search:
Sign in | Join | Help

Navigate to a custom form

Last post 02-01-2007 5:14 PM by Steve Gray. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-01-2007 5:13 PM

    • Steve Gray
    • Top 10 Contributor
      Male
    • Joined on 01-10-2007
    • Bradenton, Florida
    • Guru
    • Points 2,315

    Navigate to a custom form

    Sirs:

    I'm trying to get the hang of Visual Studio Tools for GP9, but I'm having trouble using a function:

    I need to (from a custom form) navigate to specific SOP orders.

    I am able to save the SOP form, and close it if I need to, but I can't navigate to a new order. Patrick (on the GP forums) suggested using Microsoft.Dexterity.Applications.DynamicsDictionary.SopEntryForm.OpenWindowFunction, but I can't figure out how to use it. I need a VB code sample, please.

    Again, the task is to navigate to a specific SOP order in the SOP entry form. The form can start as either open or closed.

    Thanks!

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • Post Points: 0
  • 02-01-2007 5:14 PM In reply to

    • Steve Gray
    • Top 10 Contributor
      Male
    • Joined on 01-10-2007
    • Bradenton, Florida
    • Guru
    • Points 2,315

    Re: Navigate to a custom form

    Steve, What you want to do is call the OpenWindow() function of the SOP_Entry form. This function takes the SOP Number and SOP Type as parameters, and if those are not empty, it will open the window and display the sales document. In the VSTDGPProgrammersguide.pdf, it talks about how to call form level functions on page 65. You will want to take a look at that. You will be using the Invoke() method to call that function. The parameters for the function can be found in the GP 9.0 SDK. In the Content>8.0to9.0 directory, there is a CoreParams_900.txt. They are as follows:

    function returns integer OpenWindow;

     

    in 'SOP Number' sSOPNumber;

    in 'SOP Type' nSOPType;

    optional in boolean fGiveWarningForTypeChg;

    optional in 'Customer Number' CustID;

    optional in 'Caller ID' nCallerID;

    So you would want to pass in the sop number, sop type, false for the third parameter, empty string for the fourth parameter and 1 for the fifth paramter.

    That should open the window and display a SOP Document.

    Dave

    MBS Dev Support

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • Post Points: 0
  • 02-01-2007 5:14 PM In reply to

    • Steve Gray
    • Top 10 Contributor
      Male
    • Joined on 01-10-2007
    • Bradenton, Florida
    • Guru
    • Points 2,315

    Re: Navigate to a custom form

    Please, I've put it so many hours on this, I really need help. I need a working vb example to open the SOP Entry form.

    I have the SDK, I see the text that you mention above.

    I cannot find 'openWindow' in the code. I can find 'openWindowFunction', that can be found like this:

    DynamicsDictionary.SopEntryForm.OpenWindowFunction

    Dynamics.Forms.SopEntry.OpenWindowFunction

    Microsoft.Dexterity.Applications.DynamicsDictionary.SopEntryForm.OpenWindowFunction

    However, 'openWindowFunction' gives errors when I try to use it like page 65 suggests.

    I can't find 'openWindow' anyplace in the code, I don't see how to reference it.

    Please... a code sample?

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • Post Points: 0
  • 02-01-2007 5:14 PM In reply to

    • Steve Gray
    • Top 10 Contributor
      Male
    • Joined on 01-10-2007
    • Bradenton, Florida
    • Guru
    • Points 2,315

    Re: Navigate to a custom form

    Steve, Ok, if you look at page 65 in the programmers guide under accessing form-level functions, it has a sample of exactly what you want.

     

    Dynamics.Forms.SopEntry.Functions

    From there, if you hit the period, you will see the OpenWindow function. Then you do an Invoke() on it. The code that you have above isn't in the right class. I wouldn't have pointed you to the manual if I didn't think it would help, your answer is right there, all you have to do is look.

    Dynamics.Forms.SopEntry.Functions.OpenWindow.Invoke("STDINV2265", 3, false, "", 0)

    Dave

    MBS Dev Support

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • Post Points: 0
Page 1 of 1 (4 items)