How to call add_new_row function on textbox focus in erpNext

How do I customized “add new row” button function on Itemcode textbox focus

can anyone tell me how to do it

Hi @saba_ilex

Use childtablename_add event, for more details please check below code

Hello @rohit_w Thanks for the reply

but i solved it using custom script

cur_frm.cscript.item_code = function() { cur_frm.add_child("items"); cur_frm.refresh_field("items"); }

without changing the Core files
Anyways Thanks : )