I would like to know what the default sort order of the QueryExpression object. I can't seem to find it anywhere
Asked
Active
Viewed 850 times
0
-
2I agree with @Aron's answer below, but you can't really take a dependency on sort order if you don't specify it as part of the query. If all of a sudden - because of some change in code or a SQL setting - it started returning the records in a different order (or even a random order) that wouldn't be a bug, because any order is correct if no sort order is specified. – Nicknow Oct 05 '17 at 23:41
-
1https://stackoverflow.com/a/26237450/1474519 – jcjr Oct 06 '17 at 10:50
1 Answers
4
I believe the default sort order will be by the ID (primary key).
That's the clustered index of each entity table. When no order is specified, FetchXML returns records sorted by GUID.

Aron
- 3,877
- 3
- 14
- 21