I want to declaire some variables on client side, how can I do t hat?
e.g:
frappe.ui.form.on('Sales Order', {
const status = {
EXTERNA: 'Externa',
};
let externa = status.EXTERNA;
refresh: function (frm) {
console.log(externa);
}
});
I want to declaire some variables on client side, how can I do t hat?
e.g:
frappe.ui.form.on('Sales Order', {
const status = {
EXTERNA: 'Externa',
};
let externa = status.EXTERNA;
refresh: function (frm) {
console.log(externa);
}
});
@Leonardo_Augusto
You can declare variables in the sales_order.js file and use it appropriately
frappe.ui.form.on('Sales Order','onload', function(frm, cdt, cdn) {
var payment_value=0;
payment_value=cur_frm.doc.payment_value;
});
Refer this link for further information Developer Cheatsheet · frappe/frappe Wiki · GitHub
I hope you find this useful.