Sorting of sObjects in Salesforce
I had a requirement where I had to sort a list of custom object records (Product__c) by a custom text field Group__c alphabetically and then by a currency field Price__c from lowest to highest. There is an instance method sort() for List collection type, it sorts the items in the list in ascending order. Using …