Adding functionality to a button

i created a custom button called student in the dropdown menu of lead in crm module.Now when i click on student it should take me to the Student doctype in education module.Need help in implementing the second part.

@abdulaziz are you using v12 ?

Hi @abdulaziz,

Please apply it.

frappe.ui.form.on('Lead', {
	refresh(frm) {
		frm.add_custom_button(__("Student"), function() {
				frappe.set_route("app", "student");
			}, __("Menu"));
	}
});

Reload and check it, please.

Thank You!

It is working fine, but i want the button to be in the dropdown menu along with customer,quotation and opportunity options.

nope, it’s v13

which doctype? @abdulaziz

frappe.ui.form.on('Lead', {
	refresh(frm) {
		frm.add_custom_button(__("Student"), function() {
				frappe.set_route("app", "student");
			}, __("Create"));
	}
});

Please check it.

thanks for the help, got it working. And can you please just elaborate why did you write “app”?