Udostępnij za pośrednictwem


How Visual Studio Tools was used

This sample application uses several features of Visual Studio Tools for Microsoft Dynamics GP to implement this integration.

User interface

The special WinForm available for Dynamics GP add-ins was used when creating the Environmental Details window.

Resources accessed

The Estimate Freight sample uses many resources in the Dynamics dictionary:

Forms
  • IvItemMaintenanceForm
Windows
  • IvItemMaintenanceWindow
Tables

Data for the integration is stored in the following table:

  • SyUserObjectStoreTable (DUOS)

This is the same table used by VBA to store data. The DUOSHelper class of the Environmental Details sample contains methods that are used to write, retrieve, and delete rows from the DUOS table.

Form-level functions
  • DexError of the SyVisualStudioHelper form

Events

The Environmental Details sample registers the following events in Microsoft Dynamics GP:

  • A menu handler event for the Item Maintenance form, used to display the Environmental Details form.
  • A form open event on the Item Maintenance form, used to create an instance of the Environmental Details form.
  • A form close event on the Item Maintenance form, used to indicate when the Item Maintenance window has been closed. This event closes the Environmental Details form and removes it from memory.
  • A change event for the Item Number field in the Item Maintenance window, used to keep the Environmental Details window updated with the current item being displayed.
  • A change event for the Item Description field in the Item Maintenance window, used to keep the Environmental Details window updated with the current item being displayed.
  • A change event for the Save Record field in the Item Maintenance window, used to save the environmental details when the user saves the item.
  • An after modal dialog event for the Item Maintenance window, used to retrieve the response when the user confirms whether to delete the current item. If the user chooses to delete the current item, the corresponding environmental details information is also deleted.

Macro support

Calls to the RecordMacroItem() method have been added to the controls in the Environmental Details form to support recording macro statements. The PlayMacroItem() method from the DexUIForm base class has been overridden to support playback of the macro statements that have been recorded.

Web client

The Environmental Details sample uses dynamic rendering to work in the web client.