How can I remove the menu options and action options as well

How can I remove the menu options and action options as well

dear abdulraheemsherif,

i give some examples i hope it will help, those are for Supplier Quotation button.

remove dash button

$("[data-doctype='Supplier Quotation']").hide();

remove Create>Supplier Quotation

cur_frm.page.remove_inner_button(__('Supplier Quotation'),  __('Create'));

remove custom button in form

frm.remove_custom_button('button_name');

remove pre created button in form like Sales Order Buttons:

remove code is

setTimeout(() => {
          cur_frm.page.remove_inner_button(__('Close'),  __('Status'));
          cur_frm.page.remove_inner_button(__('Pick List'),  __('Create'));
          cur_frm.page.remove_inner_button(__('Delivery Note'),  __('Create'));
          cur_frm.page.remove_inner_button(__('Work Order'),  __('Create'));
          cur_frm.page.remove_inner_button(__('Material Request'),  __('Create'));
          cur_frm.page.remove_inner_button(__('Request for Raw Materials'),  __('Create'));
          cur_frm.page.remove_inner_button(__('Purchase Order'),  __('Create'));
          cur_frm.page.remove_inner_button(__('Project'),  __('Create'));
          cur_frm.page.remove_inner_button(__('Payment Request'),  __('Create'));
          cur_frm.page.remove_inner_button(__('Payment'),  __('Create'));
        },100);

customize in your need.

thanks, @emre I really appreciate your response.

can you help with a guide or tutorial to customize erp ui

Thanks for your reply. but it didnt work for me.
My target is to remove the submenu items in the action and menu button.

Please refer to the image.

I just Tested, non of my code is remove Menu items.

Yeah, can you help me out with it

sorry about that i can’t.

According to my understanding, you want to remove all the default entries in the “Menu” dropdown and keep only your custom menu items.
To achieve this you can remove the entire Menu dropdown and then add your custom buttons again as shown below.

cur_list.page.clear_menu()
cur_list.page.add_menu_item('Save To Agents')

Hellow Sir,
How would I restrict access to some buttons in the menu , Only roles allowed can view. For example I want to restrict Return/Credit not to a certain role.See attached image