DexWinHelpLaunchUrl()

The DexWinHelpLaunchUrl() function launches help content for the Microsoft Dynamics GP web client. The content is displayed in a new web browser window.

Syntax

DexWinHelpLaunchUrl(url)

Parameters

url - A string that specifies the URL of the content to be displayed in a new web browser window. The URL can be a complete URL or a partial URL.

Return value

None

Comments

If you are specifying a complete URL, the URL should begin with http:// or https:// and contains the full path to the content to be displayed.

If you are specifying a relative URL, the relative URL should begin with a forward slash (/) and provide the remaining path to the content after the server name. The Microsoft Dynamics GP web client runtime will automatically prepend the server name to the relative URL.

The content is displayed in new web browser window that has a special name assigned to it. If this browser window is left open, subsequent calls to the DexWinHelpLaunchUrl() function will replace the content of this browser window.

Examples

The following C# example shows a portion of the code that runs when the user clicks the Help button in the form for the Estimate Freight sample. The DexRuntimeGetClientType() function is used to ensure that code runs on only the web client. The URL for the help content is assembled, including the server path, help folder, and HTML file to display. The DexWinHelpLaunchURL() is used to display the help content.

if (Dynamics.Forms.SyVisualStudioHelper.Functions.DexRuntimeGetClientType.
Invoke() == 2)
{
    // Web client

    // Is a different web client help server being used?
    string server = Dynamics.Forms.SyVisualStudioHelper.Functions.
    DexDefaultsRead.Invoke("WebClientHelpServer",2);

    // Help folder
    string helpFolder = "Help";

    // File to access
    string helpFile = "EstimateFreight.htm";

    // Full URL to access
    string url = server + "/" + helpFolder + "/" + helpFile;

    // Launch the help
    Dynamics.Forms.SyVisualStudioHelper.Functions.DexWinHelpLaunchUrl.
    Invoke(url);
}

The following Visual Basic example shows a portion of the code that runs when the user clicks the Help button in the form for the Estimate Freight sample. The DexRuntimeGetClientType() function is used to ensure that code runs on only the web client. The URL for the help content is assembled, including the server path, help folder, and HTML file to display. The DexWinHelpLaunchURL() is used to display the help content.

If Dynamics.Forms.SyVisualStudioHelper.Functions.DexRuntimeGetClientType _
.Invoke() = 1 Then

    ' Web client

    ' Is a different web client help server being used?
    Dim server As String = Dynamics.Forms.SyVisualStudioHelper.Functions _
    .DexDefaultsRead().Invoke("WebClientHelpServer", 2)

    ' Help folder
    Dim helpFolder As String = "Help"

    ' File to access
    Dim helpFile As String = "EstimateFreight.htm"

    ' Full URL to access
    Dim url As String = server + "/" + helpFolder + "/" + helpFile

    ' Launch the help
    Dynamics.Forms.SyVisualStudioHelper.Functions.DexWinHelpLaunchUrl _
    .Invoke(url)
End If