Hello,
Could you please help me with the script for a custom Button in Erpnext?
When click on the custom button to have the the number defivned into , numar_telefon" opened into the android Call aplication
Custom Doctype: Sesizari
Module : CRM
Custom Field: numar _telefon
Hi,
You can use frappe.call to call whitelisted method on python side . On python side you can write your logic.
JS Script:
frappe.ui.form.on("Sesizari", "refresh", function(frm) {
frm.add_custom_button(__("Button"), function() {
return frappe.call({
method : "path_to_your_whitelisted_method",
args : {
"numar_telefon" : this.frm.doc.numar_telefon,
},
})
})
});
python side:
@frappe.whitelist()
def myfunction(numar_telefon):
#Your required logic
2 Likes
I will try but it looks complicate.
Can you help with this please?