Adjusted updateRecord function to save parameters