I have some scripts running on Item doctype.
Everything works in a perfect way.
There is only one issue when I import data.
after_save event does not do anything when I import Excel data.
How can i trigger the code below when I import new items using Data Import?
frappe.ui.form.on("Item", {
after_save: function(frm) {
if(frm.doc.item_group == "Product"){
var custom_serial_no = frm.doc.item_code;
custom_serial_no += ".###";
frm.set_value('serial_no_series', custom_serial_no);
}
}
});