Copy record based on exiting;