I have a customization on the End Activity screen in MES that has a Form_Load method to select a certain textbox, to streamline our barcoding. The method works fine but it only triggers the first time that screen is opened per MES session. The next time someone goes to end an activity Form_Load() does not run. I believe this is because it is being stored in cached memory or something similar and is not actually “loading” when it is opened.
Is there another event I could trigger off of that would allow me to do the same thing? Or can Form_Load() be modified to run every time?
Ahh that makes sense.
I tried it a couple ways but neither of them selected what I needed to.
First I made a public void called SelectBox and called it under //End Wizard Added Custom Method Calls but nothing happened.
I also tried just adding the code underneath there instead of putting it into a method.
qty = (EpiNumericEditor)csm.GetNativeControlReference(“f1fdcf24-066d-424e-9b59-319a804854fa”);
qty.Select();
Do I need to add a reference in DestroyCustomCode in order for it to work?
well for example when you add a Form event it adds something like
this.markComplete.Click += new System.EventHandler(this.markComplete_Click); into InitializeCustomCode
and
this.markComplete.Click -= new System.EventHandler(this.markComplete_Click); into DestroyCustomCode
I don’t quite understand how Epicor handles tab index. I have that field set to an index of 1 but it instead focuses on the OK button at the bottom of the screen which has a tab index of 3.
I ended up adding a timer that started in InitializeCustomCode with an eventhandler for my SelectBox method. I think the Initialize custom code was happening too quickly to select it so I added a half second delay.