how to integrate dns based multi tenant erp-next integration

dns based multitenant erp-next integration support wilcard subdomain how to do that most i have already used dns_multitenant_on all but cannought create

frappe.ui.form.on(‘Sales Invoice’, {
global_discount_percentage(frm) {
const discount = frm.doc.global_discount_percentage || 0;

    frm.doc.items.forEach(item => {
        item.discount_percentage_on_rate_with_margin = discount;
    });

    frm.refresh_field('items');
},

validate(frm) {
    const discount = frm.doc.global_discount_percentage || 0;

    frm.doc.items.forEach(item => {
        item.discount_percentage_on_rate_with_margin = discount;
    });
}

});

Can you explain the detailed steps to integrate a multi-tenant ERPNext implementation using a wildcard subdomain? I encountered an error when creating a second site.