Doctype A
Child Table 1 (Link field x; Trigger Field xx)
Child Table 2 (Link field y; Comparison field yy)
- When the trigger field xx is updated
- Check in table 2 for row where x=y
- For row x=y ; copy yy to xx
The following reference is not working:
Doctype A
Child Table 1 (Link field x; Trigger Field xx)
Child Table 2 (Link field y; Comparison field yy)
The following reference is not working:
This solved the problem, handled the case as part of validate.
frappe.ui.form.on(“DOCTYPE”, {
validate: function(frm){
frm.doc.items.forEach(function(item){ //Target Table
frm.doc.hardwareset_bom_mapping_table.forEach(function(hsbom){//Source Table
if(item.hardware_set == hsbom.hardware_set) //Matching/Comparing field in Source & Target
{
item.bom_no = hsbom.bom; //Source table field copied to Target field
}
});
});
}
});