RecordSortedList.sortOrder Method

Defines the fields on which the records are sorted.

Syntax

public void sortOrder(FieldId fieldId,  )

Run On

Called

Parameters

  • Type: [T:]

Remarks

You can specify one or more fields to sort on.

This method can only be called one time on the same instance of the RecordSortedList class. You cannot change the sorting order after it has been set.

Examples

The following example creates a list of DimensionSetRuleTable table records, and then sorts them by the SetId field, and then by the HierarchyId field.

static RecordSortedList initRulesList() 
{ 
    RecordSortedList list; 
  
    list = new RecordSortedList(tablenum(DimensionSetRuleTable)); 
    list.sortOrder( 
        fieldnum(DimensionSetRuleTable, SetId),  
        fieldnum(DimensionSetRuleTable, HierarchyId)); 
    return list; 
}

See Also

RecordSortedList Class

RecordSortedList.sortOrderFromContainer Method