You need to sign in to do that
Don't have an account?

Apex- Oreder by - Field cannot be sorted
Hello,
I tried to sort an object in Query Editor but I get this error:
[object Object]: name from campaignmember ORDER BY Type_d_inscription__c ^ ERROR at Row:1:Column:65 field 'Type_d_inscription__c' can not be sorted in a query call
This is my query:
select Type_d_inscription__c, name from campaignmember ORDER BY Type_d_inscription__c
My Field is Multi-Select Filed type.
I tried to sort an object in Query Editor but I get this error:
[object Object]: name from campaignmember ORDER BY Type_d_inscription__c ^ ERROR at Row:1:Column:65 field 'Type_d_inscription__c' can not be sorted in a query call
This is my query:
select Type_d_inscription__c, name from campaignmember ORDER BY Type_d_inscription__c
My Field is Multi-Select Filed type.
Refer to below statement in the salesforce developer document.
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).
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_orderby.htm
Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.
Best Regards,
Sandhya