public void LaunchInEpicor(CommandLineParams o, Session epiSession, bool edit, bool modal = true)
        {
            epiSession["Customizing"] = edit;
            EpiTransaction epiTransaction = new EpiTransaction(new ILauncher(epiSession));

            Ice.UI.App.CustomizationMaintEntry.Transaction            oTrans   = new Ice.UI.App.CustomizationMaintEntry.Transaction(epiTransaction);
            Ice.UI.App.CustomizationMaintEntry.CustomizationMaintForm custData = new Ice.UI.App.CustomizationMaintEntry.CustomizationMaintForm(oTrans);

            oTrans = (Ice.UI.App.CustomizationMaintEntry.Transaction)custData.GetType().GetField("trans", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(custData);

            SearchOptions opts = new SearchOptions(SearchMode.AutoSearch)
            {
                DataSetMode = DataSetMode.RowsDataSet,
                SelectMode  = SelectMode.SingleSelect
            };

            opts.NamedSearch.WhereClauses.Add("XXXDef", $"Key1='{o.Key1}' and Key2 ='{o.Key2}' and Key3='{o.Key3}' and TypeCode='{o.LayerType}' and ProductID='{o.ProductType}'");
            oTrans.InvokeSearch(opts);
            MenuDataSet.MenuRow menuRow = (MenuDataSet.MenuRow)oTrans.GetType().GetMethod("getMenuRow", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(oTrans, new object[] { "Run" });
            menuRow["Company"] = string.Empty;

            epiSession["AllowCustomizing"] = edit;
            if (edit)
            {
                epiSession["Customizing"] = epiSession.CanCustomize;
            }
            else
            {
                epiSession["Customizing"] = false;
            }
            if (edit)
            {
#if EPICOR_10_2_300
                oTrans.GetType().GetMethod("addFormnameToArguments", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(oTrans, new object[] { menuRow });
#endif
            }

            LaunchFormOptions lfo = new LaunchFormOptions();
            lfo.IsModal = modal;
            lfo.Sender  = oTrans;
            MenuDataSet mnuds = new MenuDataSet();
            mnuds.Menu.Rows.Add(menuRow.ItemArray);
            lfo.MenuDataSet = mnuds;

            FormFunctions.Launch(oTrans.currentSession, menuRow, lfo);
        }
        public void LauncWithTracing(object mnuRow, object ses, object lfo, CommandLineParams o, Form me)
        {
            this.o = o;
            MenuDataSet.MenuRow menuRow = mnuRow as MenuDataSet.MenuRow;
            Session             session = ses as Session;
            LaunchFormOptions   opts    = lfo as LaunchFormOptions;

            opts.CallBackToken = "EpicorCustomizatoinCBT";
            opts.IsModal       = false;
            launchedForm       = me;
            CustomizationVerify cm = new CustomizationVerify(session);
            string dll             = cm.getDllName(o.Key2);

            ProcessCaller.ProcessCallBack += new ProcessCallBack(standardCallBackHandler);
            ProcessCaller.LaunchForm(new ILauncher(session), dll.Replace(".dll", ""), opts, true);

            TracingOptions.ShowTracingOptions(new Form(), session);
        }