Hide Button in the Sales Order Doc Type

Can anybody help me in a Client Script of Frappe ERPNext in the Sales Order Doctype?

In the Sales Order Action Default Button “Create” and by clicking on this Create we get the Drop Down Options as “Delivery Note”, “Pick List” and so on.

We want to hide only the Delivery Note Option from this drop-down of the Create Button, that is Delivery Note should be hidden after clicking on this Create Button, and the Create button should be available and should be able to select from the Drop-down with other Options in the Dropdown, except for Delivery Note

Hi @jitendra,
You can write custom script as shown below to hide this button.
frappe.ui.form.on(‘Sales Order’, {
refresh(frm) {
setTimeout(() => {
frm.remove_custom_button(‘Delivery Note’, 'Create ');
}, 1000);


@Safvan_Ph , Thanks a lot. Its working.