Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Open GP window from external VB Application

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a vb.net application where I am doing some processing. I want one button to go to GP ( if running) and open Purchase order entry window.

Later I want to populate fields on this window and press buttons but I cannot even get to GP and open the window. How do i do this?

Specific instructions with some code would be great to accomplish this, what references to put in, what else to do would really help me a lot.

*This post is locked for comments

  • sandipdjadhav Profile Picture
    sandipdjadhav 18,265 on at
    Re: Re: Re: Re: Re: Re: Open GP window from external VB Application

    Mariano,

    Thanks much for your quick reply, your code work like champ.. !!!

     

    Thanks much appreciate your help.

    Sandip Jadhav

  • Mariano Gomez Profile Picture
    Mariano Gomez 26,225 on at
    Re: Re: Re: Re: Re: Open GP window from external VB Application

    string dexErrorMsg, dexCmd;
    int dexErrorCode;
    Dynamics.Application objGPApp = new Dynamics.Application();

    dexcmd = "";
    dexcmd += "open form RM_Customer_Maintenance;";

    objGPApp.CurrentProductID = 0;
    objGPApp.CurrentProduct = objGPApp.CurrentProduct + "";
    dexErrorCode = objGPApp.ExecuteSanscript(dexCmd, out dexErrorMsg);

    if (dexErrorCode != 0)
    {
    MessageBox.Show(dexErrorMsg);
    }

    You should also consider checking if the form is open prior to issuing the open form statement

  • sandipdjadhav Profile Picture
    sandipdjadhav 18,265 on at
    Re: Re: Re: Re: Open GP window from external VB Application

    Mariano,

    Below code is working with GP 10.0 but with GP 2010 its not working.. !!! Whats wrong with it Can you please help me?

    Dynamics.Application objGPApp = new Dynamics.Application();

    //Dynamics.Application objGPApp = (Dynamics.Application)Activator.CreateInstance(Type.GetTypeFromProgID("Dynamics.Application"));

     

    objGPApp.CurrentProductID = 0;

     

    intErrorValue = objGPApp.ExecuteSanscript("open form 'RM_Customer_Maintenance';",

    out strErrorMessage);

     

    Error is : Unknown Identifier 'RM_Customer_Maintenance'.

     Don't know what I am missing.

    Your earliest reply is highly appreciable.

    Thanks
    Sandip

     

     

  • Mariano Gomez Profile Picture
    Mariano Gomez 26,225 on at
    Re: Re: Re: Open GP window from external VB Application

    [quote user="Sandip Jadhav"]

    Mariano,

    Thanks so much for your reply .

     

    Thanks

    Sandip

    [/quote]

    If you are coding an external application and need access to Microsoft Dynamics GP from your external application, then to access the Continuum Integration Library, you will need to do the following:

    [VB.NET]

    Dim oDynamics As Object
    Set oDynamics = CreateObject("Dynamics.Application")

    [C#]

    Dynamics.

    Application oDynamics = (Dynamics.Application)Activator.CreateInstance(Type.GetTypeFromProgID("Dynamics.Application"));

    In your case, there will be no need to reference any of the Visual Studio Tools (VST) assemblies since these are only useful when working with VST-based solutions.

  • sandipdjadhav Profile Picture
    sandipdjadhav 18,265 on at
    Re: Re: Open GP window from external VB Application

    Mariano,

    Thanks so much for your reply .

     

    Thanks

    Sandip

  • Mariano Gomez Profile Picture
    Mariano Gomez 26,225 on at
    Re: Open GP window from external VB Application

    Since your application is written in VB.NET, you will need to use the Dynamics Continuum Integration Library to accomplish your objectives. You can download the Continuum manual from CustomerSource or PartnerSource.

  • sandipdjadhav Profile Picture
    sandipdjadhav 18,265 on at
    Re: Re: Re: Re: Re: Re: Open GP window from external VB Application

    Thanks much Hamza.

    Sandip

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Re: Re: Re: Re: Open GP window from external VB Application

    Sandip, Look at this link. It might solve your problem.

    http://mohdaoud.blogspot.com/2009/10/practical-example-on-dynamics-continuum.html

    Hamza 

     

  • sandipdjadhav Profile Picture
    sandipdjadhav 18,265 on at
    Re: Re: Re: Re: Open GP window from external VB Application

    Sir,

    Thanks much for your quick reply, I am trying to create windows form application ,on button click event I want to open Cusotmer Maintenace window , same like in other button click event -Vendor Maintenence window something like that using C#.

    Any sample code will help lot.

    Thanks

    Sandip

  • Richard Whaley Profile Picture
    Richard Whaley 25,195 on at
    Re: Re: Re: Open GP window from external VB Application

    The instructions referred to in the IM text discuss running GP from a command line.  The use of IM is optional.  Additional instructions on creating and running macros can be found in Confessions of a Dynamics GP Consultant available from our web site.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans