Refresh Whole Child Table

cur.frm.refresh("{{child_table}}") is not working, i want to refresh all data in child table.

did u find any solution?

If u want to refresh specific child table, u may use cur_frm.refresh_field("child_table_name"). If entire document, u can use cur_frm.refresh().

thanks, but this refresh command isn’t working :frowning:

May I see ur code and also which doctype child table u want to refresh?

@AMS_Fauzi
Child table i am trying to refresh is that of “salary details” in the field “deductions” in Salary Slip. I have tried using both cur_frm.refresh_field(‘deductions’) and cur_frm.refresh_field(‘salary_details’) but it doesnt refresh.

The code is copied below. Kindly advise:

frappe.ui.form.on(‘Salary Slip’, {
refresh: function(frm)
{
frappe.call({
method:“frappe.client.get_value”,
async:false,
args:{
doctype:‘Lunch Mess Option’,
filters:{
employee:cur_frm.doc.employee
},
fieldname:‘opt_in’
},callback:function®{
console.log(r.message);
if(r.message !== undefined){
cur_frm.set_value(‘opt_in’,r.message.opt_in);
cur_frm.refresh_field(‘opt_in’);
cur_frm.refresh_field(‘deductions’);
}
}
});
}});