Helper function overview

The helper functions are part of the SyVisualStudioHelper form in the Dynamics dictionary. You will use these functions to access specific functionality of the Microsoft Dynamics GP runtime, such as reading from and writing to the Dex.ini file.

The helper functions are also used to perform web client operations that can't be done with standard .NET code. The functions for displaying modal dialog boxes are an example of this. For Visual Studio Tools integrations for the desktop client, you can use the MessageBox class from the .NET framework to display modal dialogs. This class is not supported on the web client. Instead, you must use one of the helper functions like DexError to display the modal dialog. This helper function works for both the desktop client and the web client.

The following C# example shows how the DexWarning() helper function is used to display a modal dialog.

Dynamics.Procedures.GetNextFormNoteToOpen.Invoke(out formNumber);
if (formNumber == 0)
{
    // Too many notes already open
    Dynamics.Forms.SyVisualStudioHelper.Functions.DexWarning.Invoke
    ("Too many note windows open");
}