Khatavahi BI Solutions LLP - Add Custom Button on Form
Add custom button on form when perticular condition is true in frappe and erpnext
·
1 min read
// Script for ToDo Formfrappe.ui.form.on('ToDo', {// on refresh eventrefresh(frm) {// if reference_type and reference_name are set,// add a custom button to go to the reference formif (frm.doc.reference_type && frm.doc.reference_name) {frm.add_custom_button(__(frm.doc.reference_name), () => {frappe.set_route("Form", frm.doc.reference_type, frm.doc.reference_name);});}}})
Jigar Tarpara
ERPNext & Frappe Consultant ERPNext & Frappe Developer CEO at Khatavahi BI Solutions LLP
No comments yet. Login to start a new discussion Start a new discussion