Set value In a Child Table Field

If I create a sales invoice and add any item to its child table, then as I edit it, the name of the employee who is creating the sales invoice should come in the blank field of the employee name.

@abhishek_pathak

frappe.ui.form.on("Sales Invoice Item", {
    items_add: function (frm, cdt, cdn) {
       frappe.db.get_value("Employee", {'user_id': frappe.session.user}, ["employee_name"], (r) => {
                frappe.model.set_value(cdt, cdn, "employee_name", r.employee_name);
        });
 }
});

Ok Sir Thanks…

@abhishek_pathak Please mark this as solution if it works for you