List_Open

Examples


The List_Open procedure defined in the syListObj form is used to open a list from sanScript code. The list content can be displayed in the main Microsoft Dynamics GP window or in a separate window.

This procedure must always be called with the background keyword to prevent conflicts with other list code that may be running.


Syntax

List_Open of form syListObj, list_dict_ID, list_ID, view_ID {, restriction_integer}{, restriction_string1} {, restriction_string2} {, separate_window}

Parameters

list_dict_ID – An integer specifying the ID of the product that defines the list.

list_ID – An integer specifying the unique ID assigned to the list.

view_ID – An integer specifying the view to use for the list. Typically, the constant LIST_PRIMARYVIEWID is used to specify that the primary view is used.

restriction_integer – An optional integer parameter that can be used to specify a restriction for the list.

restriction_string1 – An optional string parameter that can be used to specify a restriction for the list.

restriction_string2 – An optional string parameter that can can be used to specify a restriction for the list.

separate_window – An optional boolean that specifies whether the list is displayed in a separate window. The value true specifies that the list will appear in a separate window, while false specifies that the list will appear in the main Microsoft Dynamics GP window. The default is to display in the main window.

Comments

Microsoft Dynamics GP can display one card list, one trasaction list, and one report list at a time. The lists can be in either the main Microsoft Dynamics GP window or a separate window. Before you open a list using sanScript code, you must verify that a list of that type is not already open.

You can use the optional restriction parameters for the List_Open procedure to pass information to the list that specifies what data will be displayed in the list. If you supply the restriction parameters, their values will be temporarily stored as properties for the command associated with the list. You can retrieve the property values using the Command_GetNamedProperty() function. The following table lists the constants defined in the syListObj form that correspond to the named properties that will be set for the command used for the list.

[spacer]

Constant

Description

NAMEDPROP_RESTRICTIONTYPE

The optional integer restriction parameter.

NAMEDPROP_RESTRICTIONSTRING1

The first string restriction parameter.

NAMEDPROP_RESTRICTIONSTRING2

The second string restriction parameter.


Typically, these restriction parameters are retrieved and used in the Refresh procedure for the list being opened.


Documentation Feedback