Hooking into Create a new item in a child table


I have been able to hook into Create a new customer etc with

frm.fields_dict.customer.new_doc=function() {}

but can not hook into the same function in a client table. I have tried

cur_frm.fields_dict[‘items’].grid.get_field(‘batch_no’).new_doc =function(){}

but this doesn’t seem to work, also I have tried other variants and still can’t solve… I must be missing something simple. I am using ERPNext version 11 .

Any help would be appreciated.