Hi folks,
I am making my first steps with jscript and erpnext and I would like to execute a simple get call when clicking a button.
I need to populate following URL parts of the get inserted below:
{userphonenumber} with the phonenumber stored in the users account
{phone_number} with a current doc form field
Thank you very much!
frappe.ui.form.on("Supplier", {
refresh: function(frm) {
// use the __islocal value of doc, to check if the doc is saved or not
frm.add_custom_button("Call Supplier", function() {
$.get(
"https://api.voverc.com/api/v2/temp/c2c/{token}/{userphonenumber}/{phone_number}",
);
}, "Call Supplier")
}});