Custom Button forward to Import Data screen by frappe.set_route?

If I use frappe’s default import data function my url looks like:
Can I customize a button to move to this page instead of going to the Data Import Tool?
I tried frappe.set_route and route_options but it didn’t work

Hi @duynguyen,

Please check and try it.

frappe.ui.form.on('Your DocType', {
    refresh: function(frm) {
        frm.add_custom_button(__('Go to Data Import'), function() {
            frappe.route_options = {
                "reference_doctype": frm.doctype,
                "import_type": "Insert New Records"
            frappe.set_route("Form", "Data Import", 'new-data-import');

Please set your doctype in the script.

Thank You!