I want to call Sales Invoice from Journal Entry Account using reference name as a link of Invoice)
frappe.ui.form.on(“Journal Entry Account”, “get_invoice”, function(frm) {
frappe.set_route(“Form”, “Sales Invoice”, “frm.doc.reference_name”)
});
Traceback (innermost last):
File “/home/frappe/press/benches/1606241046/apps/frappe/frappe/app.py”, line 57, in application
response = frappe.handler.handle()
File “/home/frappe/press/benches/1606241046/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/frappe/press/benches/1606241046/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/press/benches/1606241046/apps/frappe/frappe/init.py”, line 806, in call
return fn(*args, **newargs)
TypeError: runserverobj() takes at least 1 argument (1 given)
Seems you have select wrong doctype on custom script, Instead of Journal Entry Account select Journal Entry as DocType.
For more detail, check below image.