Hi all,
I’m trying to create a custom script to add comment so that, when price is saved the old price will be added to timeline comments.
Script:
frappe.ui.form.on("Item Price", {
refresh: function(frm) {
frm.comments.insert_comment("Submitted", frm.doc.price_list_rate);
}
});
On refresh an exception is raised:
TypeError: undefined is not an object (evaluating 'frm.comments.insert_comment')
Any help appreciated, thx