Site Search:
Sign in | Join | Help

How to get started with eConnect

Last post 01-09-2009 10:11 AM by gijeet. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-07-2009 9:25 AM

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

    How to get started with eConnect

    The most frequently asked question here is 'how do I get started with eConnect?'. I've long known that the first example with any programing paradigm is the hardest thing to do - it's as true with VB.NET or ASP.NET as it is with eConnect. Here is a step by step walk through on how to get started.

    Assumptions

    The sample code provided written in Visual Studio 2008, VB.NET, ASP.NET in VB, and written against Dynamics GP 10.0. We assume familiarity with that environment.

    The sample code is SAMPLE CODE ONLY, NOT FIT FOR PRODUCTION USE. It is intended to teach eConnect, and should not be used for any other purpose.

    The files provided are compacted with WinRAR.

    Introduction

    First, read this, it's a conceptual primer for eConnect. It will tell you what eConnect does. http://vstoolsforum.com/forums/p/350/731.aspx#731

    Help File

    Download and read the help file, which is here. Yes, read it. Every word.
    http://vstoolsforum.com/downloads/eConnect 10ProgrammersGuide.rar

    Next, go back to the step above. You really need to do this.  

    Serialization vs Manual coding

    Serialization

     Serialization means that we instantiate eConnect objects and populate them, then use those objects to create the XML document that eConnect needs. That's an advanced topic, so we'll skip it for now.

    Manual Coding

    By 'manual coding', I mean that we're going to create an XML document by hand and then feed it to eConnect. The document that we're going to use will create/update a customer record.

    eConnect has a 'client - server' relationship with Dynamics, meaning that your code frequently does not reside on the SQL Server. That can cause issues if you try to send a transaction from your client machine to the server, you have to set up 'DCOM' to make that work. I've had issues with this, so I don't do it. On all my jobs I set up a web service on the SQL Server and send that service an XML doc. It is very easy to do, and works without issue. That's what we're going to do here.

    Download the VB.NET solution here
    http://vstoolsforum.com/downloads/econnect10.rar
    and open it up in VS2008. THE CODE MUST BE INSTALLED ON THE SQL SERVER to work. Once you get it working, you can publish the web service to the SQL Server, set a reference to it, and then move the client code off the server. For this example we're going to do it as simply as possible.

    There are three projects in the sample solution. eConnect10 is the main library, Econnect Service is the Web Service, and Tester is a VB application that call the eConnect code and service.

    The most frequently asked question here is 'how do I get started with eConnect?'. I've long known that the first example with any programing paradigm is the hardest thing to do - it's as true with VB.NET or ASP.NET as it is with eConnect. Here is a step by step walk through on how to get started.

    Assumptions

    The sample code provided written in Visual Studio 2008, VB.NET, ASP.NET in VB, and written against Dynamics GP 10.0. We assume familiarity with that environment.

    The sample code is SAMPLE CODE ONLY, NOT FIT FOR PRODUCTION USE. It is intended to teach eConnect, and should not be used for any other purpose.

    Introduction

    First, read this, it's a conceptual primer for eConnect. It will tell you what eConnect does. http://vstoolsforum.com/forums/p/350/731.aspx#731

    Help File

    Download and read the help file, which is here. Yes, read it. Every word.
    http://vstoolsforum.com/downloads/eConnect%2010%20ProgrammersGuide.chm

    Serialization vs Manual coding

    Serialization

     Serialization means that we instantiate eConnect objects and populate them, then use those objects to create the XML document that eConnect needs. That's an advanced topic, so we'll skip it for now.

    Manual Coding

    By 'manual coding', I mean that we're going to create an XML document by hand and then feed it to eConnect. The document that we're going to use will create/update a customer record.

    eConnect has a 'client - server' relationship with Dynamics, meaning that your code frequently does not reside on the SQL Server. That can cause issues if you try to send a transaction from your client machine to the server, you have to set up 'DCOM' to make that work. I've had issues with this, so I don't do it. On all my jobs I set up a web service on the SQL Server and send that service an XML doc. It is very easy to do, and works without issue. That's what we're going to do here.

    Download the VB.NET solution here
    http://vstoolsforum.com/downloads/econnect10.rar
    and open it up in VS2008. THE CODE MUST BE INSTALLED ON THE SQL SERVER to work. Once you get it working, you can publish the web service to the SQL Server, set a reference to it, and then move the client code off the server. For this example we're going to do it as simply as possible.

    There are three projects in the sample solution. eConnect10 is the main library, Econnect Service is the Web Service, and Tester is a VB application that call the eConnect code and service.

    Steps To Get The Code Working

    Open the app.config code in the tester and locate the <appSettings> section. Edit the 'webservice' key to point to the 'Econnect Service' project in the solution. The easiest way to do this is to delete and re add the service reference to the web service in the Tester application. Carefully note the URL for the service as you do it. Note: The application is written is such a way that you can easily change from the development web service to one published on your SQL Server. This is controlled by this appSettings key.

    In the app.config file, set the reference to your server and database.

    In the VB Code, find and replace the references to your server and database. 

    Run the Tester application, step through the code and watch the transaction as it goes to Dynamics.

    If you have any difficulty with this, or if I haven't explained it right, please write me with suggestions.

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • Post Points: 0
  • 01-08-2009 10:01 AM In reply to

    Re: How to get started with eConnect

    Hello, I downloaded the .chm help file but it doesn't display any pages.  I get "The page cannot be displayed" error.  Please download it yourself and see if it works for you but I never had any issues opening any other .chm files.

    G

    • Post Points: 0
  • 01-08-2009 12:42 PM In reply to

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

    Re: How to get started with eConnect

    I was afraid that would happen. I compacted the file now with WinRAR, you should be able to download it. Go to www.rarlab.com to get WinRAR, if you need it. It's free.

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • Post Points: 0
  • 01-09-2009 10:11 AM In reply to

    Re: How to get started with eConnect

    You da Man! Thanks for this info.  I'll review the help file and the vb solution (even thou I'm a C# programmer) it should be very helpful. Once I get up to speed, I'll convert it into C#.

     

    G

    • Post Points: 0
Page 1 of 1 (4 items)