Compartir a través de


Running the sample application

The Salesperson Analysis sample application is composed of two assemblies. The Visual Studio Tools assembly is the standard .NET assembly that is created for all add-ins. The sample also has a Silverlight .xap file that contains the Silverlight application that runs on the web client. Regardless of the type of client you are using, you must build the .NET assembly. If you are going to run the sample in a Microsoft Dynamics GP web client installation, you must also build the Silverlight application.

Building the .NET assembly

To build and run the .NET assembly for the Salesperson Analysis sample, perform the following steps:

  1. Extract the .zip archive containing the samples.

    In the folder where Visual Studio Tools was installed, locate the Samples.zip archive. This archive contains both the C# and Visual Basic versions of the samples. Extract this archive to a location that you have permissions to access.

  2. Open the Salesperson Analysis sample solution.

    Using Visual Studio, open the solution file SalespersonAnalysis.sln for the C# or Visual Basic version of the sample.

  3. Verify the references for the sample solution.

    Use Visual Studio to view the references for the project. The Salesperson Analysis sample should include references to the following assemblies:

    • Application.Dynamics

    • Microsoft.Dexterity.Bridge

    • Microsoft.Dexterity.Shell

    If any of these references for the project are not valid, re-add them to the project.

  4. Set the Solution Configuration.

    Set the Solution Configuration to Release to build the release version of the application.

  5. Build the application.

    From the Build menu, choose Build Solution. If there are no build errors, the assembly the for the Lookups application will be built.

  6. Install the Salesperson Analysis assembly.

    Copy the SalespersonAnalysis.dll from the Release folder for the project to the AddIns folder in the Microsoft Dynamics GP installation.

  7. Start the Microsoft Dynamics GP desktop client.

    The Salesperson Analysis sample application will be loaded. Log in to Microsoft Dynamics GP and select a company.

  8. Open the Salesperson Maintenance window.

    In Microsoft Dynamics GP, open the Salesperson Maintenance window.

  9. Select a salesperson.

    In the Salesperson Maintenance window, select a salesperson.

  10. Display the Salesperson Analysis window.

    In the Additional menu, choose Salesperson Analysis. The Salesperson Analysis window will appear.

  11. Examine the customers for the salesperson.

    The customers for the selected salesperson will be listed, along with the year-to-date sales information. You can select a customer in the list and then click View Customer to display the Customer Inquiry window to view detailed information about the customer.

Silverlight application

To build and install the Silverlight application for the Salesperson Analysis sample, perform the following steps:

  1. Install the Silverlight prerequisites.

    Follow the guidelines in Requirements for developing with Silverlight to install the prerequisites needed for doing Silverlight development.

  2. Retrieve the Microsoft Dynamics GP web client assemblies.

    Using the procedure described in Referencing web client assemblies, obtain the following three assemblies:

    • Microsoft.Dynamics.GP.Web.Silverlight

    • Microsoft.Dynamics.GP.Web.UI.Silverlight

    • Microsoft.Dynamics.GP.Web.UI.Silverlight.Controls

    Copy the assemblies to a folder named "GP Silverlight Assemblies" that you created at the root of the C: drive.

  3. Open the Salesperson Analysis SL sample solution.

    Using Visual Studio, open the solution file SalespersonAnalysisSL.sln for the C# or Visual Basic version of the sample. This is the solution for the Silverlight component of the sample.

  4. Verify the references for the sample solution.

    Use Visual Studio to view the references for the project. The Salesperson Analysis SL sample should include references to the three assemblies that you extracted from the .xap file for the web client:

    • Microsoft.Dynamics.GP.Web.Silverlight

    • Microsoft.Dynamics.GP.Web.UI.Silverlight

    • Microsoft.Dynamics.GP.Web.UI.Silverlight.Controls

    If any of these references for the project are not valid, re-add them to the project by referencing the assemblies that you extracted.

    Warning: Be sure that you set the CopyLocal property for the assembly references to False. This is important so that the .xap file you are creating will be loaded correctly.

  5. Set the Solution Configuration.

    Set the Solution Configuration to Release to build the release version of the Silverlight .xap file.

  6. Build the solution.

    From the Build menu, choose Build Solution. If there are no build errors, the .xap file for the Salesperson Analysis sample will be built.

  7. Install the Salesperson Analysis .xap file.

    Copy the SalespersonAnalysisSL.xap from the Release folder for the project to the \WebClient\ClientBin folder in the Microsoft Dynamics GP installation on the web client server.

  8. Start the Microsoft Dynamics GP web client.

    The Salesperson Analysis assembly will be loaded, along with the Silverlight .xap file. Log in to Microsoft Dynamics GP and select a company.

  9. Open the Salesperson Maintenance window.

    In Microsoft Dynamics GP, open the Salesperson Maintenance window. Select a salesperson and then choose Salesperson Analysis from the Additional menu. The web client version of the Salesperson Analysis window will be displayed. You can use this window just as you would the version in the Microsoft Dynamics GP desktop client.