Event in enter new record

Hi,
I have a question about the event fired when we click on NEW button to enter new record to a doctype?

any help plz
i asked about an event which occured when we click on New button in any doctype. is there an event in frappe for that?
Thanks

@KanchanChauhan can you help?

1 Like

Assuming that the child table is called : “CHILD Doc” and in Parent doc the field is called ‘items’

frappe.ui.form.on('CHILD Doc', {
  items_add: function(frm){
    // your btn event has been triggered  :)

  }
});

Can you please explain what exactly you want to do? I am not able to understand the use case?

I found it
thank you.
I have asked about the event that fired when i create a new record for any doctype, and i do it in JS file onload function