Input records to object and redirect the page