I want to make option in lead like make customer

Hi @shreya115
it’s giving error doctype not found.

but I have already written doctype name.

Thank You

share script

below are script :-

frappe.ui.form.on(“Lead”, {
refresh: function(frm) {
frm.add_custom_button(__(“Risk Profile”), function() {
frappe.route_options = {
“lead”: frm.doc.lead_name
};
frappe.new_doc(“[risk_profile]”);
}, __(“Make”));
}
});

It should be frappe.new_doc("Risk Profile")

1 Like

Hi @shreya115
that’s worked
Thank You.