i want to get data from parent doctype in linked field called “P” to his child table linked field Called “C” only when i press add row button and check all the table before for if it’s empty or not only when i press add_row button , thanks in advance
solution worked for me.
frappe.ui.form.on('ChildDOCtype'),{
[tablename_parent_doctype]_add:function(frm,cdt,cdn){
var d=locals[cdt,cdn];
frappe.model.set_value(cdt,cdn,'target field',value yyou want to add)
},
}),