I need to launch the Serial Matching screen from a button click (in MES). I have tried
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
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â.
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?
//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);
}