Yousuf
February 1, 2023, 8:32am
1
Hi All
I’m tired of removing or hiding the button from the form view, but it’s no use
how to solve this
frappe.ui.form.on('Sales Order', {
refresh(frm) {
setTimeout(() => {
frm.remove_custom_button('Update Items');
frm.remove_custom_button('Close', 'Status');
frm.remove_custom_button('Work Order', 'Make');
}, 10);
}
})
Foram
February 3, 2023, 6:01am
2
Try This:
frappe.ui.form.on('Sales Order', {
refresh(frm) {
setTimeout(() => {
frm.remove_custom_button('Update Items');
frm.remove_custom_button('Close', "Status");
frm.remove_custom_button('Work Order', "Create");
}, 10);
}
})
I’ve tried this to hide the PDF button from quotation and sales order print preview page but its not working.
Foram
July 17, 2023, 10:09am
4
No, that I do not know, I have not tried yet.
Shaun
July 31, 2023, 1:10am
5
Would love to find the solution to this. No idea why… but remove_custom_button
works on the “Customer” doctype, but not my “Sales Invoice” doctype
Shaun
July 31, 2023, 1:14am
6
ahh ok. this actually works… just needed to increase my timeout to 1000. Not sure why the timeout isn’t required for my “Customer” doctype though, only “Sales Invoice”.