If record.id is set as undefined or empty, make a POST.