To run this sample application, perform the following steps:
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 Visual Studio Solution Explorer. Open test.cs in the C# project or Module1.vb in the Visual Basic .NET project.
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.
To build the solution, choose “Start Debugging” in the Debug menu. Notice how the console window opens and closes.
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.
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.