How could I remove Get Items From from sales invoice

Hi @Manal_Al-Subaei,

Reference:

frappe.ui.form.on('Sales Invoice', {
    refresh(frm) {
        setTimeout(() => {
            frm.remove_custom_button('Sales Order', 'Get Items From');
            frm.remove_custom_button('Delivery Note', 'Get Items From');
            frm.remove_custom_button('Quotation', 'Get Items From');
        }, 10);
    }
});

Documenation: Hide Buttons in Form View

Thank You!


did not work with me

Remove the last line of code.
Please check my code.

I worked properly my side in version 15.

ERPNext: v15.16.2 (version-15)
this is my installed version

Please check it.

If not work then increase the setTimeout.

Thank You!

it worked, thanks.