Running the sample application
To run this sample application, perform the following steps:
Start Visual Studio and open the solution file for the sample application.
The solution file for the C# version of the sample is named eConnectSalesOrder_CSharp_ConsoleApplication.sln. The solution file is in the CSHARPSalesorderConsoleApplication folder inside the Samples folder.
The solution file for the Visual Basic .NET version is named eConnect_VB_ConsoleApplicationSales.sln. The solution file is in the VBDOTNETSalesorderConsoleApplication folder inside the Samples folder.
Open the source file.
Open the Visual Studio Solution Explorer. Open test.cs in the C# project or Module1.vb in the Visual Basic .NET project.
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 sales order to be created.
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.
View the SalesOrder.xml file.
The C# project creates the SalesOrder.xml file in the project's \bin\debug folder. The Visual Basic .NET project creates the SalesOrder.xml file in the \bin folder. The SalesOrder.xml file contains the eConnect XML document for the new sales order.
Verify the sales order is in Microsoft Dynamics GP.
Use the Microsoft Dynamics GP client to verify the sales order was created. Search for the sales order created based on the eConnect XML document in the SalesOrder.xml file.