AnsweredAssumed Answered

Custom object multi-level ordering/sorting

Question asked by Jon Yang on Feb 1, 2019
Latest reply on Feb 1, 2019 by Sanford Whiteman

Hi everyone,


I'm trying to figure out how to sort custom objects on multiple levels and need some assistance. So I'd sort by date/time with most recent at the top and then sort by boolean field with "true" values at the top. The result would be the most recent record with "true" value at the top. The below is kind of what I'm trying to achieve but, of course, this gives me an error. Any help is appreciated!


#set( $codeByMostRecent = $sorter.sort($List_cList,"availabilityUpdated:desc") && $sorter.sort($List_cList,"Availability:desc") )  
#set( $latest_code = $codeByMostRecent[0] )

## Output