Overriding Buttons

My solution for this has always been to remove the custom button and add my own back, often with the same title.

frm.remove_custom_button("Purchase Order", "Create")
frm.add_custom_button(
    "<b>Purchase Order</b>",
    () => { 
         custom_po_creation_function(frm)
    },
     "Create"
)
1 Like