Open New instance of student batch

Hi

want to open new instance of student batch doctype

using button click

what i am doing right now for doing this

window.location.href = 'desk#Form/Student%20Batch/New%20Student%20Batch%201?name='+JSON.stringify(stud_id)+"&title="+JSON.stringify(stud_name)

may i know is there any better way to do this

where stud_id and stud_name is two parameters passed to do student batch can any one help me to find better solution for this
thanks

frappe.new_doc('Student Batch', {
  program: 'Test1',
  academic_year: 2017,
})

@netchampfaris it is opening new it instance of student batch but it is not auto filling the fields

i have program named App Builder so did this

frappe.new_doc(‘Student Batch’, {
program: ‘App Builder’,
})

i also want to prepopulate the child table in student batch

@netchampfaris is any hope on above question