Add truncate function to record classes.