Running the sample application

To run this sample application, perform the following steps:

  1. Start Visual Studio and open the solution file for the sample application.

    The solution file for the C# version of the sample is named eConnect_CSharp_ConsoleApplication.sln. The solution file is in the CSHARPConsoleApplication folder inside the Samples folder.

    The solution file for the Visual Basic .NET versions is named eConnect_VB_ConsoleApplication.sln. The solution file is in the VBDOTNETConsoleApplication folder inside the Samples folder.

    1. Open the source file.

      Open the Visual Studio Solution Explorer. Open the Class1.cs file in the C# project or Module1.vb file in the Visual Basic .NET project.

      1. Update the connection string.

        Locate the variable named sConnectionString and set the Data Source value to the name of your Microsoft Dynamics GP SQL Server. Set the Initial Catalog value to the name of the Microsoft Dynamics GP company database where you would like the new customer to be created.

        1. Choose Start Debugging from the Debug menu.

          To build the solution, choose “Start Debugging” in the Debug menu. Notice how the console window opens and closes.

          1. View the customer.xml file.

            The C# project creates the customer.xml file in the project’s \bin\debug folder. The Visual Basic .NET project creates the customer.xml file in the project’s \bin folder. The customer.xml file contains the eConnect XML document for the new customer.

            1. Verify the customer is in Microsoft Dynamics GP.

              Use the Microsoft Dynamics GP client to verify the customer was created. Search for the customer based on the eConnect XML document in the customer.xml file.