Can we execute Client Script when user clicks on a button in Child Table?

Hello,

I have a child table in which I have added a field called btn_finish.

I was to execute a Client Script when user clicks on this button.

Here is the screen shot for reference.

This button only shows up when a user clicks on a row.

Is there any way to associate a Client Script to the click event of this button?

TIA

Yogi Yang

yes add js hook on child table like

ducky.ui.form.on("BOM Operations", {
	finish: function(frm, dt, dn){
		
	}
});

Hello,

Thanks I managed to capture the click event. But I am not able to detect as to which Row’s button was clicked.

Is there anything more that I have to do here?

Here the parameter dt is returning the Child Table’s DocType name while dn is returning a hexa value. Both of these are strings.

TIA

Yogi Yang

to access the exact line use

var doc = locals[dt][dn]
1 Like