Hide button from make menu through custom script

Hello All,
I am trying to remove button “Installation Note” from “make” menu in th delivery note doctype. How can we achieve it. we have tried follwoing methods but not getting desired results.
cur_frm.page.remove_inner_button((“Installation Note”),(“Make”));
cur_frm.page.get_inner_group_button(__(“Make Installation Note”)).find(“button”).addClass(“hide”);

If anyone know how to do that through custom script can help.

frappe.ui.form.on("Delivery Note", {
	onload: function(frm) {
        frm.remove_custom_button("Installation Note", 'Make');
	    //to hide more than one button
        //frm.remove_custom_button(["Installation Note", "Sales Return"], 'Make');
	}
});
5 Likes