According to my use case i created a button called student and upon clicking the student button it should take me to the doctype student with the first name of student being auto filled from the lead name. Can anyone help me with this?
You can always create new doctype with frappe.new_doc("Student")
.
If it shows a Quick Entry dialog, you can fill the first name using
frappe.new_doc("Student", {}, d => { d.set_value('first_name', frm.lead_name) }))
If it is a new form itself, you can use
frappe.new_doc("Student", {}, f => { f.first_name = frm.lead_name })