var childTable = cur_frm.add_child(“deductions”);
childTable.salary_component=“CPF”;
childTable.amount=result[1];
cur_frm.refresh_fields(“deductions”);
refresh_field(“total_deduction”);
If i manually add a child to the deductions table, the textfield total_deduction would be updated whereas when i used the script above to add, it will not reflect unless i change the value in the table manually. Any ideas?