Hi I am getting below error in my custom script I am sure it is related to syntax but I am not able to find the issue. Anybody idea?
Error:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Code:
frappe.call({
method: "library.update_items.fill_item_details",
agrs: d1,
callback: function(r) { }
});
Regards
Ruchin Sharma
please check and validate the JSON data, you can validate the json at jsonline.com
Hi @makarand_b
Which JSON data you are talking about, I have no idea about it.
Regards
Ruchin Sharma
@makarand_b
Sorry, I pasted wrong code but here is my actual code.
which is giving me the same error.
frappe.ui.form.on("Lead", "onload", function(frm, doctype, name)
{
frappe.call({
method: "library.update_items.get_items_from_product",
callback: function(r) {
$.each(r.message, function(i, item) {
var new_row1 = frm.add_child("pv_one_set_details");
new_row1.pv_one = item.set_name;
new_row1.quantity=0;
});
refresh_field("pv_one_set_details");
}
});
});
Regards
Ruchin Sharna