Generalize record creation