i created one child table doctype.then i created another doctype in which i want to pull data automatically from child table .can you help me please with custom script code?
Dear sir,
This is not working
frappe.ui.form.on(“DocTypeB”, “Trigger”, function(frm) {
frappe.model.with_doc(“DocTypeA”, frm.doc.trigger, function() {
var tabletransfer= frappe.model.get_doc(“DocTypeA”, frm.doc.Trigger)
$.each(qmtable.ChildTableA, function(index, row){
d = frm.add_child(“ChildTableB”);
d.field1 = row.fielda;
d.field2 = row.fieldb;
cur_frm.refresh_field(“ChildTableB”);
});
})
});
Please help me with modified one