Running the sample applications

To run either 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# sample application is named DocumentNumberSample.sln. The solution file is in the CSHARPGetNextDocumentNumber folder inside the Samples folder.

    The solution file for the Visual Basic .NET sample application is named NextNum_TestHarness.sln. The solution file is in the NextNum_TestHarness folder inside the Samples folder.

    1. Choose Start Debugging from the Debug menu.

      To build either solution, choose “Start Debugging” in the Debug menu. The application starts.

      1. Update the connection string.

        To configure the connection string in the C# sample application, enter the name of your Microsoft Dynamics GP SQL server in the SQL Server box. Enter the name of your Microsoft Dynamics GP database in the Database box.

        The Visual Basic .NET application uses a dialog box to manage the connection string parameters. Click the ellipsis (...) button labeled BackOffice Connection String. Use the dialog box to specify your Microsoft Dynamics GP server name, log in name, password, and database. Click OK to close the dialog window.

        1. Retrieve the next document number.

          To retrieve the next available document numbers using the C# application, click the Get Next Numbers button. The application will display the next number for each document type.

          To retrieve the next available SOP document number using the Visual Basic .NET application, mark the Get next number option and click the Run button. The application display the next available SOP number. To return the number, mark the Rollback number option and click the Run button.