The Presentation API includes several methods that you can use for record sorting.
Because a record sort request is simply a variation of a basic navigation request, rendering the results of a record sort request is identical to rendering the results of a navigation request.
However, there are specific objects and method calls that can be accessed from a Navigation object that return a list of valid record sort properties, as shown in the examples below. (This data is only available from navigation and record search requests.)
Each ERecSortKey object contains the name of a property or dimension that has been enabled for record sorting, as well as a Boolean flag indicating whether the current request is being sorted by the given sort key, and an integer indicating the direction of the current sort, if any (ASCENDING, DESCENDING, or NOT_ACTIVE).
ERecSortKeyList keylist = nav.getSortKeys();
for (int i=0; i < keylist.size(); i++) {
ERecSortKey key = keylist.getKey(i);
String name = key.getName();
int direction = key.getOrder();
}
ERecSortKeyList keylist = nav.SortKeys;
for (int i=0; i < keylist.Count; i++) {
ERecSortKey key = keylist[i];
String name = key.Name;
int direction = key.GetOrder();
}