0

I cannot seem to find anything specific to this error. Attempting to install a managed package and getting Dependant class error is a specific org.

the error is essentially (minus the stack trace)

Dependant class invalid...... field 'Name' cannot be sorted in a query call

and the stack is all about the managed package classes...

The query in question is:

    Contact billingContact = [
            SELECT Id, Name, FirstName, LastName, Email, MailingCity, MailingState,
                    MailingCountry, MailingPostalCode, MailingStreet
            FROM Contact
            WHERE Id =: contactId
            ORDER BY Name
    ];

So it is on a standard Contact object sorting by the name filed.

I see all sorts of "cannot be filtered" but nothing related to the name field and the word "sorted"

Anyone run into this before and have a solution? The packaging org is fine and does not indicate anything needs recompiled yet when trying to install the destination org throws this error

3

Found the answer here

SOQL ORDER BY Statements

Because deterministic encryption doesn’t maintain the sort order of encrypted data in the database, ORDER BY isn’t supported.

And the other type of encryption does not support order by either so basically if the field being sorted is encrypted at all your queries will throw the error

| improve this answer | |
  • yep - and no LIKE or relative comparison (>,<, <=, >=) operators either. Your managed package vendor is going to love getting the support ticket saying their product is not Shield-enabled and you'll be asking for a refund – cropredy Oct 26 '19 at 19:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.