Azure CosmosDB does not support ordering unless an index is defined for the properties of the index.
Taken from Azure CosmosDB documentation:
An ORDER BY clause that orders by a single property always needs a range index and will fail if the path it references doesn't have one.
Similarly, an ORDER BY query which orders by multiple properties always needs a composite index.
If the dataview associated with the transaction you are navigating does not have an appropriate index defined, the following specification error is thrown.
error spc0116: Group cannot be ordered by <> in group starting at line.
Define an index at the dataview definition, according to the order needed.
The index definition must have the Datastore of type Service in all cases.
: GeneXus infers an ordering based on what is explained here