Avatar of heykjo
heykjo
 asked on

How to I custom sort multiple fields in SalesForce Apex

In a Salesforce Apex class how can we sort a list of custom objects by multiple fields asc or desc?  I have a need to sort based on certain conditions from within an apex trigger.  I cannot re-query the data to sort using a soql query because it hits a query limit.
 
I know half the answer to this question.  Create a wrapper class http://salesforce.stackexchange.com/questions/8370/how-to-sort-wrapper-list .  Just have to figure out how to do it for multiple fields.  Also, I’m hoping there is an easier way.
ProgrammingEnterprise SoftwareSalesforce

Avatar of undefined
Last Comment
Jamie Browning

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Jamie Browning

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61