server: move the code for the update_record control to its own file