Handling button click in a child table inside a document

I need to handle a button click inside a child table inside the Therapy Plan document. How can I implement it.
Thank You

This is the button I am referring to.

From Awesome Bar > Client Script List > Add Client Script

Name: Name this script
DocType: Choose Your DocType
Apply To: Form
Script:

frappe.ui.form.on('Your DocType', {
	refresh(frm) {
		// your code here
	}
})

frappe.ui.form.on('Your Child DocType', {
	this_is_your_button_name(frm, cdt, cdn) {
		frappe.msgprint("Here we are!")
	}
})

Thank You. Will try this.