RecordSortedList.sortOrder Method [AX 2012]
Defines the fields on which the records are sorted.
public void sortOrder(FieldId fieldId, )
Run On
CalledParameters
- fieldId
- Type: FieldId Extended Data Type
The ID of the first field to sort the records on.
- Type: [T:]
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;
}
Community Additions
ADD
Show: