You need to sign in to do that
Don't have an account?
SOQL FOR Loop with ORDER BY clause gives un-ordered list
When SOQL For loops used with ORDER by clause, list gives un-ordered list. We had to store the query in a local variable and loop through it to solve this issue. Any ides why this is happening?
[ORDER BY ***fieldOrderByList*** {ASC|DESC} [NULLS {FIRST|LAST}] ]
1) These data types are not supported: multi-select picklist, rich text area, long text area, encrypted (if enabled), and data category group reference (if Salesforce Knowledge is enabled).
2) All other data types are supported, with the following caveats:
3) The following factors affect results returned with ORDER BY:
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_orderby.htm
Alain