A couple questions. Are you passing values into lfo like lfo.ValueIn = “my-values”;
And calling the form passing the lfo like:
ProcessCaller.LaunchForm(this, “Epicor.Mfg.UI.EndActivityEntry”, launchObject);
Have you tested to ensure that your lfo has the values on the receiving form:
object barcodeObj = StartProdForm.LaunchFormOptions.ContextValue;
MessageBox.Show(barcodeObj.ToString());
I assume that “Start” is a valid EpiDataView on that form (in object explorer > data):
var startDV = oTrans.Factory(“Start”);
Yes start is a valid data view the issue is that he is firing this before all the stuff is loaded in the screen. @fredmeissner you may have to resort to that timer… or just move all the logic to the main MES form.
We just did a project where they wanted to minimize the clicks on MES.
So we had the shortcut launch the custom form and do all the work directly on it.
This is like the holy grail for barcode nerds. No one has been able to figure this out that I have seen so far. I hope you do so I can steal it. Hahaha!
LoL @Banderson I’ve done it however not by launching Start Activity form, just put the code in the MES menu itself. It was a pretty cool customization but it took a lot of code
Ok, I’m kinda slow, so I’m might just not know what I’m looking at, but if I understand correctly, from the main MES screen, with the only requirement be the user is logged in, you scan a barcode, and the start activivty screen opens and populates? I see what you are doing to populate the fields, but how do you get the barcode to open start activity? That’s pretty cool!
You use process calling to launch the start activity menu and pass in an LFO (launch form options) object with the barcode values
Then on the receiving form you parse the LFO extract the barcode values and the code above will populate the screen for you
So I’m noticing that when I click OK to start the activity, the MES grid view doesn’t populate with the labor activity unless I clear the screen and log back in to MES…why would the MES Menu not refresh?
I’m resurrecting an old post here, but I’m wondering what the trick is for calling the “Start Production Activity” form might be. I have tried to use the following, but nothing seems to happen - no error, no UI response:
This is where a BPM comes in really well… I bet if you ran a trace, did the function manually, you would find a BO that is triggered, and you could apply setting the values within the BPM as either a pre or post processes, and it would work very easily.
This is being called from a customization within the MES Menu form. I’ve placed that specific line within a method that parses a barcode scan and sets that value in a container that gets passed to the LaunchFormOptions context value parameter. Afterward, the process caller is invoked. What’s weird is, I can set a message box in a line just before the process caller in order to validate the context value, but when the process caller is invoked, nothing happens - and there are no errors to reference.
@timshuwy – I think the reason I was avoiding constructing a BPM was because I thought it would be a simple custom code solution (I know… I know… ).