Update delete record function