How to call the custom page in button of doctype

I am trying below code. it show TypeError
“Cannot read property ‘responseText’ of undefined”

frappe.local.response[“type”] = “redirect”
frappe.local.response[“location”] = “/desk#survey”

1 Like

Hi,
Please check below link, hope it will help you.