Compartir a través de


How Visual Studio Tools was used

This sample application uses the several features of Visual Studio Tools for Microsoft Dynamics GP.

User interface

The special WinForm available for Dynamics GP add-ins was used when creating the Salesperson Analysis window that is displayed on the Microsoft Dynamics GP desktop client.

Resources accessed

The Salesperson Analysis sample uses the following resources in the Dynamics dictionary:

Forms
  • RmSalespersonForm
Windows
  • RmSalespersonWindow
Tables
  • RmCustomerMstr
  • RmCustomerMstrSum
Form-level functions
  • DexError of the SyVisualStudioHelper form
  • DexWarning of the SyVisualStudioHelper form
  • DexRuntimeGetClientType of the SyVisualStudioHelper form

Events

The Salesperson Analysis sample registers the following events in Microsoft Dynamics GP:

  • A menu handler event for the Salesperson Maintenance form, used to open the Salesperson Analysis window.
  • A form open event on the Salesperson Maintenance form, used to create an instance of the Salesperson Analysis form.
  • A form close event on the Salesperson Maintenance form, used to indicate when the Salesperson Maintenance window has been closed. This event closes the Salesperson Analysis form and removes it from memory.
  • A change event for the Salesperson ID field in the Salesperson Maintenance window, used to keep the Salesperson Analysis window updated with the customers for the current salesperson.

Web client

The Salesperson Analysis sample uses custom rendering to work in the web client. This means it has a separate Silverlight .xap file that defines the Salesperson Analysis window that is displayed on the web client.

Events sent from the server

The following events are sent from the add-in running on the server to the Silverlight component running on the web client:

  • TransferSalespersonID - Transfers the values in the Salesperson ID control to the web client.
  • TransferCustomerData - Transfers the customer data in the listview control to the web client.
  • OpenSalespersonAnalysisForm - Opens the Salesperson Analysis form in the Silverlight application on the web client.
  • ShowSalespersonAnalysisForm - Causes the Salesperson Analysis form in the Silverlight application to become visible.
  • CloseSalespersonAnalysisForm - Closes the Salesperson Analysis form in the Silverlight application on the web client.
  • SetCustomerSelection - Sends the index of the item selected in the customers list on server so that the corresponding item is selected in the web client.
Events sent from the client

The following events are sent from the Silverlight component running on the web client to the add-in running on the server:

  • SetSelectedCustomer - Sends the index of the item selected in the customers list on the web client so that the corresponding item is selected on the server.
  • ViewSelectedCustomer - Causes the View Customer button to be activated on the server.
  • CloseSalespersonAnalysis - Closes the Salesperson Analysis window on the server.