Share via


FormListControl.configurationKeyEx Method

Definition

Retrieves a list that contains the IDs of configuration keys that are activated for a form list control.

public:
 override Microsoft::Dynamics::Ax::Xpp::List ^ configurationKeyEx();
public override Microsoft.Dynamics.Ax.Xpp.List configurationKeyEx ();
override this.configurationKeyEx : unit -> Microsoft.Dynamics.Ax.Xpp.List
Public Overrides Function configurationKeyEx () As List

Returns

A List object that contains the IDs of configuration keys that are activated for a form list control.

Remarks

If the control is bound to a data source, the retrieved list of configuration key IDs also includes the configuration key ID for the table and field. In addition, the retrieved list contains any configuration key IDs that are applied to the extended data type. The list does not contain duplicate IDs.

The following example shows a call to the configurationKeyEx method. The ListEnumerator object is used to traverse the elements throughout a list.

static void createForm2(Args _args) 
{ 
    Args args; 
    Form form; 
    FormRun formRun; 
    FormBuildDesign formBuildDesign; 
    FormBuildDataSource formBuildDataSource; 
    FormBuildListControl formBuildListControl; 
    FormListControl formListControl; 
    int idx4; 
    DictTable dictTable; 
    CustTable custTable; 
    configurationKeyId ID; 
    List list; 
    ListEnumerator enum; 
    DictConfigurationKey dck; 
    // Create the form header. 
    form = new Form(); 
    // Add data sources to the form. 
    dictTable = new DictTable(tableNum(custTable)); 
    formBuildDataSource = form.addDataSource(dictTable.name()); 
    formBuildDataSource.table(dictTable.id()); 
    // Create the form design. 
    formBuildDesign = form.addDesign("Design"); 
    formBuildDesign.caption("myForm"); 
    // Add a form list control. 
    formBuildListControl = formBuildDesign.addControl(FormControlType::ListView,"List"); 
    idx4 = formBuildListControl.id(); 
    args = new Args(); 
    args.object(form); 
    // Create the run-time form. 
    formRun = classfactory.formRunClass(args); 
    formRun.run(); 
    formRun.detach(); 
    formListControl = formRun.control(idx4); 
    ID = formListControl.configurationKey(configurationKeyNum(Bank)); 
    list = formListControl.configurationKeyEx(); 
    if (0 != list.elements()) 
    { 
        enum = list.getEnumerator(); 
        while (enum.moveNext()) 
        { 
            dck = new DictConfigurationKey(enum.current()); 
            if (dck) 
            { 
                print strfmt("Configuration Key ID: %1" 
                  + "Configuration Key Name: %2",enum.current(),dck.name()); 
                pause; 
            } 
        } 
    } 
}

Applies to