Remove/Hide buttons/Links from doctype in erpnext

Hello, I want to remove OR hide some of the buttons/Links from the below photos permanently. I tried many solutions that are available on the forum but it’s not working. Little help appreciated.

action menu


Hi @erpnxt_user,

Please apply client script in list view:

frappe.listview_settings['Sales Order'].onload = function(listview) {'[data-label="Edit"],[data-label="Export"]').parent().parent().remove();'[data-label="Edit"],[data-label="Import"]').parent().parent().remove();

Thank You!


Thanks, I tried it before but it wasn’t working and now it’s working lol

1 Like

Hello, this code works on the ListView, but I also need to hide it from the form.
Can you tell me how to do it?

I tried this code:
but it doesn’t work.

The button I need to remove/hide is a workflow action button: