Optimize your ERPNext Opportunity form by customizing buttons for smoother workflow. Hide clutter by removing the ‘Create Supplier Quotation’, ‘Close’ and ‘Request for Quotation’ buttons while introducing a streamlined action with the addition of the ‘Set as Lost’ button. Enhance user experience and focus on key actions with this tailored form modification. Explore Frappe framework capabilities for efficient ERP customization.
Add Following code as client script:
Home > Customization > Client Script
frappe.ui.form.on('Opportunity', { refresh(frm) { frm.add_custom_button("Set as Lost", () => { frm.set_value("status", "Lost"); }); setTimeout(() => { frm.remove_custom_button('Supplier Quotation', 'Create'); frm.remove_custom_button('Request For Quotation', 'Create'); frm.remove_custom_button('Close'); }, 10); } });
Client Script Docs: https://frappeframework.com/docs/user/en/desk/scripting/client-script
0 Comments