js for the record details page