What event is get triggered When we delete child table value?

I want to get the user that is deleted from the child table. Here is the screenshot …Capture

{fieldname}_remove : Triggered when a row is removed from a Table field

https://frappeframework.com/docs/user/en/api/form#form-events

thanks for your response…my child table link field name is “employee”. i tried “” employee_remove:function(){} “” but not working.

Capture

Try below

frappe.ui.form.on(‘MyTaxPayChild’, {
employee_remove:function (frm, cdt, cdn) {
console.log(“row remove”);
}
})

1 Like

Thank you so much dear it’s working. But how can I get the deleted employee in js file?

let row = frappe.get_doc(cdt, cdn);

1 Like

Thanks. But need to use “before_fieldname_remove” trigger function to get value. Otherwise it will give undefined value. Thanks a lot :heart_eyes:

You should read ERPNext documentation, everything is mentioned there.

before_{fieldname}_remove Triggered when a row is about to be removed from a Table field

1 Like

Yeah i am new in erpnext so some things looks confusing to me and you helped me a lot. Right now i am inserting value to child table in py file by " Insert Query ". but i think this is not the best way to insert. so how can i get new doc of child table and insert value?Capture

Please elaborate, what are you trying to do ?

First i took salary structure and hit save button

then i filter employees by salary structure in py file and save those employee to child table. Now i am inserting value to child table By "INSERT Query" but i think it’s not good way to insert value in child table. if i can take new doc of child table like
"
“doc= frappe.get_doc(MyTaxPayChild)”
doc.employee= emp.employee
doc.insert()

"
and then insert document in py file that would be great. Is it possible for child document?

I got a solution brother. for others help i just share my code