Serial Matching

I need to launch the Serial Matching screen from a button click (in MES). I have tried

  1. var session = (Ice.Core.Session)oTrans.Session;
    using (var svc = WCFServiceSupport.CreateImpl<Erp.Proxy.BO.SerialMatchingImpl>(session, Epicor.ServiceModel.Channels.ImplBase<Erp.Contracts.SerialMatchingSvcContract>.UriPath))
    {
    int nOpLLSerTrk = 0;
    svc.GetPlantLLSerTrk(out nOpLLSerTrk);
    }

Result: It does nothing

  1. var lfo = new Erp.UI.App.SerialMatchingEntry.SerialMatchingArgs(oTrans);
    ProcessCaller.LaunchForm(oTrans,“IMGO3420”, lfo);

Result: a message box stating “Could not find Assemblies/Materials to match” immediately on button click and then a message stating “Lower Level Serial Tracking not enabled for this site”.

  1. LaunchFormOptions lfo = new LaunchFormOptions();
    lfo.IsModal = false;
    lfo.ValueIn = “”;

    ProcessCaller.LaunchForm(oTrans, “IMGO3420”, lfo);

Result: Inner Exception
Unable to cast object of type ‘Ice.Lib.Framework.LaunchFormOptions’ to type
‘Erp.UI.App.SelectSerialNumbersEntry.SerialMatchingArgs’.

       at Ice.Lib.App.Launch.LaunchForm(Object LaunchObject)

At this point, I am not sure what to do. I have pressure to get this done quickly and am out of options due to my limited experience. The people I am doing this for are insistent that the Serial Matching screen appears upon button click and won’t take “Can’t do” or “It won’t work” for an answer. Is there anything else I can try or will one of these things work and I just have it wrong?

Got this resolved.

How did you resolve this? We are having the same issue.

What specifically?

We can’t launch the Serial Matching screen from a button click (in MES)

What I’m asking is what have you tried, if anything, and if you did, what messages or problems did you encounter?

I’m unsure where in the process to jump into, because the original post is lacking a bit as well.

//Use the wizard to add the SerialMatching Adapter

private void epiButtonC1_Click(object sender, System.EventArgs args)
{
	var lfo = new Erp.UI.App.SerialMatchingEntry.SerialMatchingArgs(oTrans);
	ProcessCaller.LaunchForm(oTrans,"IMGO3420", lfo);
}

This is what I did to get it to work. It isn’t perfect but works for our purposes.

Ice.Core.Session myTrans = new Ice.Core.Session(“Epicor login userID”, "Login password
", “”, Ice.Core.Session.LicenseType.DataCollection, configFile, false, “Company”, “MfgSys”);
Ice.Lib.Framework.ILauncher Trans = new Ice.Lib.Framework.ILauncher(myTrans);
Ice.Lib.Framework.EpiBaseForm e = new Ice.Lib.Framework.EpiBaseForm();
Erp.UI.App.SerialMatchingEntry.Transaction mt = new Erp.UI.App.SerialMatchingEntry.Transaction(Trans);
Erp.UI.App.SerialMatchingEntry.SerialMatchingForm mf = new Erp.UI.App.SerialMatchingEntry.SerialMatchingForm(mt);
Erp.UI.App.SerialMatchingEntry.SerialMatchingArgs x = new Erp.UI.App.SerialMatchingEntry.SerialMatchingArgs(Trans);
x.plant = “MfgSys”;
x.partNum = “”;
x.jobNum = txtJob.Text;
x.serialNum = “”;
x.assemblyNum = 0;
mf.EpiController.Equals(e.EpiController);
mf.CustomizationName = “Customization for Matching screen”;
mf.ShowDialog();

1 Like