Updated record confirm functionality to remove duplicates