Complete the record function.