Can an anyone help me to complete this

frappe.ui.form.on('Sales Invoice', {
    refresh: function(frm) {
        frm.add_custom_button(__('Issue'), function(){
         new frappe.ui.form.MultiSelectDialog({
                doctype: "Issue",
                target: this.cur_frm,
                setters: {
                   
                },
                get_query() {
                    return {
                        filters: {  status: 'Closed' }
                    }
                },
                action(selections) {
                    if (selections && selections.length > 0) {
                        $.each(selections, function (i,Issue) {
                           
                            frm.add_child("items", {
                                 items : custom_itemss,
                            });
                            customer : customer;
                        });
                        frm.refresh_field("items");
                        $(".modal").modal("hide");
                    }
                }
            });
        }, __("Get Items From"));
    }
});
 if (selections && selections.length > 0) {
                        $.each(selections, function (i,Issue) {
                           
                            frm.add_child("items", {
                                 items : custom_itemss,
                            });
                            customer : customer;
                        });
                        frm.refresh_field("items");
                        $(".modal").modal("hide");
                    }

 this section is not working```