Hi, if a student is linked with a student group and then the student gets disabled how can we remove it from the student group child table while using a script?
You can use the delete() method on the row if that is what you’re looking for.
1 Like
You can use doc.remove() for removing child row.
Ref:
doc = frappe.get_doc("doctype", "docname")
for row in doc.child_table:
if condition:
doc.remove(row)
doc.save()
1 Like
Update this line?
doc.remove(row)
1 Like
I missed that,
Thanks for correction
Thanks bro.