Hide Buttons on Forms and Home Screen

Hi All,
I would Like to Hide certain buttons on Lead Form, Below Mentioned Buttons

image

Also I would Like to Hide this below button
image

I have Custom app and below are the version details

ERPNext: v15.25.0 (version-15)
Frappe Framework: v15.28.0 (version-15)
Custom: v0.0.1 (master)

lots of threads regarding the hide button on the forum so please search for it.

Please check this.

Please check the thread.

frappe.ui.form.on("Lead", {
  refresh(frm) {
    setTimeout(() => {
      frm.remove_custom_button("Create", "Customer");
      console.log("heyyyyyyyyy It works");
    }, 1000);
  },
});

tried This code but this dont work.
console.log is present but button dont get hide

Reference:

1 Like

This worked
Many many Thanks