Sorting records in Application Scripts?
It seems that sorting a List of records by a specific field requires the field value to be cast to the underlying data type? If you don't do that, it seems like the fields will sort by object identity or some other undesired key. Am I right about this?
For example, if I have a date field in a record, must I use
(Date)record["MyDateField"] to actually get a correctly sorting date.