Is it possible to add a shortcut link in the 3 dots under list view

Hi,
Is it possible to add a shortcut link in the 3 dots under list view, i wanted to add a shortcut link like “Close Entry” under the List Settings
image

onload: function (list_view) {
  list_view.page.add_menu_item("Custom Button", () => {
      // your code here
  })
}

add this code in your car_parking_daily_sales_list.js

Reference: How i can add custom button on leave application at list view side - #3 by NCP

That for, you have to add the client script for listview so please check it.

frappe.listview_settings["Car Parking Daily Sales"] = {
    refresh: function(listview) {
        listview.page.add_menu_item(__("Close Entry"), () => {
            frappe.msgprint("Close Entry Clicked");
         // add your logic
        });
    }
};

Also check your doctype name and set it in the script.

2 Likes

it did not work.

this doctype is customized, where can i find the car_parking_daily_sales_list.js? Please note that we are hosted in Cloud Clusters. Thanks.

We tested it, it worked properly in 14, 15, and dev.

please add it in the client script doctype.

Again check your doctype name and set it in the script. lots of references are in the forum so search it and see the example.

1 Like

got it. I was trying to apply it in Form previously which is supposed to be be applied to List. Thanks a lot.