JS code:
cur_frm.cscript.hello= function(doc,dt,dn){
frappe.call({
method: “booking.booking.event.hello”,
args: {},
callback: function(r) {
if (r.message){
console.log(r.message)
}
}
})
}
Python code:
@frappe.whitelist()
def hello():
frappe.msgprint(“hello World!”)