how to create new doctype doucment in erpnext using code
frappe.ui.form.on("Wizard", "validate", function(frm, cdt, cdn) {
var d = locals[cdt][cdn];
var contact = frappe.new_doc = ({
"doctype": "Contact",
"person_profile": d.profile,
"first_name": d.first_name,
"last_name": d.last_name,
"gender": d.gender,
"email_id": d.email_id
});
console.log(contact);
frappe.db.insert(contact);
});