Open new row automaticaly in sales team table

in Sales invoice is see first row open automatically in sales item child table but in Sales team not open first row automatic
i want to after make new sales invoice show first row in sales team table automatically


Hi @Webbo_Egy,

Please apply it.

frappe.ui.form.on('Sales Invoice',  {
    refresh: function(frm) {
        if (frm.doc.__islocal) {
            var row = frm.add_child('sales_team');

Then reload and check it.
When you create a new sales invoice then will show the first row.

Thank You!


Thanks Its Working Like A Charm
Best Regards