FYI - I’m a NEWB
But if anyone is interested, this is the custom script I had created on the ‘Lab Test Results’ Doctype. I have also flagged the discussions that aided me (Immeasurably) at the end of the code snippet
frappe.ui.form.on(‘Lab Test Results’, “lab_test_structure”, function(frm) {
//if (frm.doc.lab_test_structure){ - this is not really neccessary
frm.clear_table(“parameter_lists”);
frappe.model.with_doc(“Lab Test Structure”,frm.doc.lab_test_structure, function() {
var source_doc=frappe.model.get_doc(“Lab Test Structure”,frm.doc.lab_test_structure);
$.each(source_doc.parameters_list, function(index, source_row){
var d = frm.add_child(“parameters_list”);
d.parameter=source_row.parameter;
d.sample_position=source_row.sample_position;
d.uom=source_row.uom;
cur_frm.refresh_field(‘parameters_list’);
})
})
//}
})
frappe.ui.form.on(‘Lab Test Results’,“project”, function(frm){
// your code here
cur_frm.fields_dict[‘lab_test_structure’].get_query=function(frm) {
return {
filters: [[‘Lab Test Structure’,‘Project’,‘=’,frm.project]
]
}
};
})
frappe.ui.form.on(‘Lab Test Results’,“onload”, function(frm){
// your code here
$(“.grid-add-row”).hide();
})
//Fetch the table from customer into the quotation by custom script - #6 by surajkumar
//Help needed on Frappe.Call method
//Filter with LIKE in frappe.client.get_list
//HOW TO: Fetch Child Tables - #11 by rmeyer
//How to hide "Remove" Button in Child Table - #8 by Jitendra_Rathod