Update and insert the record in the same time with Upsert function.