You need to sign in to do that
Don't have an account?
Vijay Nagarathinam 41
Order By logic using APex
HI All,
I want to implement the order by logic using apex code. I will pass the list<sobject> records based on the single field I need to manipulate the order by logic. Please let me know if anyone has any suggestions.
Thanks,
Vijay
I want to implement the order by logic using apex code. I will pass the list<sobject> records based on the single field I need to manipulate the order by logic. Please let me know if anyone has any suggestions.
Thanks,
Vijay
Adds sorting support for Lists that contain non-primitive types, that is, Lists of user-defined types.
Refer this links
https://developer.salesforce.com/forums/?id=906F0000000kAdoIAE
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_comparable.htm#apex_comparable
http://blog.deadlypenguin.com/blog/2015/10/10/comparable-sorting-objects-in-salesforce/
https://focusonforce.com/development/sorting-lists-in-salesforce/
https://salesforce.stackexchange.com/questions/68855/sorting-a-list-of-sobjects
https://thysmichels.com/2017/03/10/apex-sorting-objects-with-comparable-interface/