Pushing Data to Child Table

In doctype A i have a dialog box and want to push the data in a childtable(doctype B). On consoling add_child method I can see it there that the value has been pushed but not saved and after refresh its gone. Also no data is there in database tried with frm.save() but that also doesn’t changed anything. One more thing i saw in console was a parameter__isunsaved:1 . So any way to save data from my current requirement.

Any help ?

var row = frappe.model.add_child(cur_frm.doc, "doctype-B", "name_of_table on doctype-A");


row.id= id_data2[i];
row.followup_1= message_s;

on console.log(row), i can see the ‘id’ and ‘followup’ there but its not getting saved. Checken on database too,that doctype is completely empty.

Along with data, these parameters:

__islocal: 1
__unsaved: 1
docstatus: 0

Any way to save the data been pushed to child table from doctype A ?