Fix incorrect creation of new record when editing existing with invalid fields
Improved filtering and sort by, plus fix caching bugs